mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 12:34:18 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ba95b09d66 | |||
| a02374ce30 | |||
| c0a7a5001c | |||
| 6b5a5080a5 |
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\General\Eloquent\Filters;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class ClaimantId implements Filter
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Builder $builder
|
||||
* @param $value
|
||||
* @return Builder|mixed
|
||||
*/
|
||||
public static function apply(Builder $builder, $value)
|
||||
{
|
||||
return $builder->where('claimant_id', $value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\General\Eloquent\Filters;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
|
||||
class PackingListDeliveryStatus implements Filter
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Builder $builder
|
||||
* @param $value
|
||||
* @return Builder|mixed
|
||||
*/
|
||||
public static function apply(Builder $builder, $value)
|
||||
{
|
||||
return $value == 1 ? $builder->whereDoesntHave('transports') : ($value == 2 ? $builder->whereHas('transports', function (Builder $query) use ($value) {
|
||||
$query->whereDoesntHave('schedules', function (Builder $query) use ($value) {
|
||||
$query->where('status', '!=', ApprovalStatus::EXPIRED)->where('eta', '>', Carbon::now());
|
||||
});
|
||||
}) : $builder->whereHas('transports', function (Builder $query) use ($value) {
|
||||
$query->whereHas('schedules', function (Builder $query) use ($value) {
|
||||
$query->where('status', '!=', ApprovalStatus::EXPIRED)->where('eta', '<', Carbon::now());
|
||||
});
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\General\Interfaces;
|
||||
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
|
||||
interface Notifiable
|
||||
{
|
||||
public function subject(): MorphTo;
|
||||
|
||||
public function target(): MorphTo;
|
||||
|
||||
public function causer(): MorphTo;
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Companies\ControllersLogic;
|
||||
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Companies\Services\ListsCompanyModules;
|
||||
use App\Classes\Modules\Companies\Standards\Rules\CanListCompanies;
|
||||
use App\Http\Resources\CompanyModuleResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ListCompanyModulesLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Retrieved Company Moduels',
|
||||
'message' => 'You have successfully retrieved a list of Companies'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanListCompanies */
|
||||
private $canListCompanies;
|
||||
|
||||
/** @var ListsCompanyModules */
|
||||
private $listsCompanyModules;
|
||||
|
||||
/**
|
||||
* ListCompaniesControllersLogic constructor.
|
||||
* @param CanListCompanies $canListCompanies
|
||||
* @param ListsCompanyModules $listsCompanyModules
|
||||
*/
|
||||
public function __construct(CanListCompanies $canListCompanies, ListsCompanyModules $listsCompanyModules)
|
||||
{
|
||||
$this->canListCompanies = $canListCompanies;
|
||||
$this->listsCompanyModules = $listsCompanyModules;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$this->canListCompanies->passes();
|
||||
|
||||
$query = $this->listsCompanyModules->execute($this->listsCompanyModules->deserializeFilters($request->input('filters')));
|
||||
return $this->collectionResponse(CompanyModuleResource::collection($query));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Companies\Services;
|
||||
|
||||
|
||||
use App\Classes\General\Eloquent\AbstractListRecord;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use App\Models\CompanyModule;
|
||||
|
||||
class ListsCompanyModules extends AbstractListRecord
|
||||
{
|
||||
|
||||
/** @var CompanyModule */
|
||||
private $repository;
|
||||
|
||||
/**
|
||||
* ListsCompanyModules constructor.
|
||||
* @param CompanyModule $repository
|
||||
*/
|
||||
public function __construct(CompanyModule $repository)
|
||||
{
|
||||
$this->repository = $repository;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Builder
|
||||
*/
|
||||
function getRepository(): Builder
|
||||
{
|
||||
return $this->repository->newQuery();
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Notifications\DataTransferObjects;
|
||||
|
||||
use App\Classes\General\Interfaces\Notifiable;
|
||||
use App\Classes\General\Interfaces\DataTransferObject;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
|
||||
class NotificationObject implements DataTransferObject
|
||||
{
|
||||
/** @var string */
|
||||
private $title;
|
||||
|
||||
/** @var string */
|
||||
private $description;
|
||||
|
||||
/** @var Notifiable */
|
||||
private $subject;
|
||||
|
||||
/** @var Notifiable */
|
||||
private $target;
|
||||
|
||||
/** @var Notifiable */
|
||||
private $causer;
|
||||
|
||||
/** @var int|null */
|
||||
private $status;
|
||||
|
||||
/**
|
||||
* OrderObject constructor.
|
||||
* @param string $reference
|
||||
* @param int $type
|
||||
* @param int|null $status
|
||||
*/
|
||||
public function __construct(
|
||||
string $title,
|
||||
string $description,
|
||||
Notifiable $subject,
|
||||
Notifiable $target,
|
||||
Notifiable $causer,
|
||||
?int $status = ApprovalStatus::PENDING_VERIFICATION
|
||||
)
|
||||
{
|
||||
$this->title = $title;
|
||||
$this->description = $description;
|
||||
$this->subject = $subject;
|
||||
$this->target = $target;
|
||||
$this->causer = $causer;
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Notifiable
|
||||
*/
|
||||
public function getSubject(): Notifiable
|
||||
{
|
||||
return $this->subject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Notifiable
|
||||
*/
|
||||
public function getTarget(): Notifiable
|
||||
{
|
||||
return $this->target;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Notifiable
|
||||
*/
|
||||
public function getCauser(): Notifiable
|
||||
{
|
||||
return $this->causer;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getStatus(): int
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Notifications\Processors;
|
||||
|
||||
use App\Classes\Modules\Notifications\DataTransferObjects\NotificationObject;
|
||||
use App\Classes\Modules\Notifications\Services\CreatesNotification;
|
||||
|
||||
class CreateNotificationProcessor
|
||||
{
|
||||
/** @var CreatesNotification */
|
||||
private $createsNotification;
|
||||
|
||||
/**
|
||||
* CreateNotificationProcessor constructor.
|
||||
* @param CreatesNotification $createsNotification
|
||||
*/
|
||||
public function __construct(CreatesNotification $createsNotification)
|
||||
{
|
||||
$this->createsNotification = $createsNotification;
|
||||
}
|
||||
|
||||
public function execute(NotificationObject $object)
|
||||
{
|
||||
$notification = $this->createsNotification->execute($object);
|
||||
return $notification;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Notifications\Services;
|
||||
|
||||
use App\Classes\Modules\Notifications\DataTransferObjects\NotificationObject;
|
||||
use App\Models\Notification;
|
||||
|
||||
class CreatesNotification
|
||||
{
|
||||
/**
|
||||
* @param NotificationObject $object
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(NotificationObject $object) {
|
||||
$model = new Notification();
|
||||
$model->title = $object->getTitle();
|
||||
$model->description = $object->getDescription();
|
||||
$model->status = $object->getStatus();
|
||||
$model->subject_type = get_class($object->getSubject());
|
||||
$model->subject_id = $object->getSubject()->id;
|
||||
$model->target_type = get_class($object->getTarget());
|
||||
$model->target_id = $object->getTarget()->id;
|
||||
$model->causer_type = get_class($object->getCauser());
|
||||
$model->causer_id = $object->getCauser()->id;
|
||||
$model->save();
|
||||
|
||||
return $model;
|
||||
}
|
||||
}
|
||||
@@ -63,12 +63,10 @@ class CreateOrderLogic extends AbstractControllerLogic
|
||||
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
|
||||
|
||||
$address = $this->fetchesAddress->execute(['id' => $request->input('address_id')]);
|
||||
|
||||
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['id' => $request->input('warehouse_id')]);
|
||||
|
||||
if(!in_array($company->companyModules()->importers()->first()->id, WarehouseReferences::YD_EXEMPT_LIST)){
|
||||
$originWarehouse = $this->fetchesCompanyModule->execute(['reference' => $originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU ? WarehouseReferences::YD_GUANG_ZHOU : WarehouseReferences::YD_YIWU]);
|
||||
}
|
||||
$originWarehouse = $originWarehouse->reference === WarehouseReferences::VT_GUANG_ZHOU ? $this->fetchesCompanyModule->execute(['reference' => in_array($company->id, [2376]) ? WarehouseReferences::VT_GUANG_ZHOU : WarehouseReferences::YD_GUANG_ZHOU]) : $this->fetchesCompanyModule->execute(['reference' => WarehouseReferences::YD_YIWU]);
|
||||
|
||||
if($originWarehouse->reference === WarehouseReferences::YD_YIWU && in_array($address->state_id, [5, 13, 14])) {
|
||||
throw new RequestValidationException('Our Yiwu warehouse is unable to ship goods to Sabah & Sarawak at the moment. you can select our Guangzhou warehouse as an alternative.');
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Orders\ControllersLogic;
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Orders\Services\FetchesOrder;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Classes\Modules\Remarks\Processors\CreateRemarkProcessor;
|
||||
use App\Http\Resources\OrderResource;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CreateOrderRemarkLogic extends AbstractControllerLogic
|
||||
{
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created Order',
|
||||
'message' => 'You have successfully created a new Order'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var FetchesOrder */
|
||||
private $fetchesOrder;
|
||||
|
||||
/** @var CreateRemarkProcessor */
|
||||
private $createRemarkProcessor;
|
||||
|
||||
/**
|
||||
* CreateOrderRemarkLogic constructor.
|
||||
* @param FetchesOrder $fetchesOrder
|
||||
* @param CreateRemarkProcessor $createRemarkProcessor
|
||||
*/
|
||||
public function __construct(FetchesOrder $fetchesOrder, CreateRemarkProcessor $createRemarkProcessor)
|
||||
{
|
||||
$this->fetchesOrder = $fetchesOrder;
|
||||
$this->createRemarkProcessor = $createRemarkProcessor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$order = $this->fetchesOrder->execute(['id' => $request->route('id')]);
|
||||
|
||||
$object = new RemarkObject($request->input('content'), auth()->user()->id);
|
||||
|
||||
$this->createRemarkProcessor->execute($order, $object);
|
||||
|
||||
return $this->resourceResponse(new OrderResource($order));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -72,16 +72,8 @@ class AssignPackingListOrderLogic extends AbstractControllerLogic
|
||||
|
||||
/**
|
||||
* CreateRemarkLogic constructor.
|
||||
* @param FetchesPackingList $fetchesPackingList
|
||||
* @param FetchesOrder $fetchesOrder
|
||||
* @param UpdatesPackingListOwner $updatesPackingListOwner
|
||||
* @param UpdatesTransportStatus $updatesTransportStatus
|
||||
* @param CreatesContract $unityCreateContract
|
||||
* @param ActivateContractProcessor $unityActivateContract
|
||||
* @param CreateContractEntityProcessor $unityCreateContractEntity
|
||||
* @param AssignContractEntityProcessor $unityAssignContractEntity
|
||||
* @param UpdatesPackingListContractReference $updatesPackingListContractReference
|
||||
* @param CreatesStep $createsStep
|
||||
* @param CanCreateRemark $canCreateRemark
|
||||
* @param CreatesPackingListRemark $createsPackingListRemark
|
||||
*/
|
||||
public function __construct(FetchesPackingList $fetchesPackingList, FetchesOrder $fetchesOrder, UpdatesPackingListOwner $updatesPackingListOwner, UpdatesTransportStatus $updatesTransportStatus, CreatesContract $unityCreateContract, ActivateContractProcessor $unityActivateContract, CreateContractEntityProcessor $unityCreateContractEntity, AssignContractEntityProcessor $unityAssignContractEntity, UpdatesPackingListContractReference $updatesPackingListContractReference, CreatesStep $createsStep)
|
||||
{
|
||||
|
||||
+2
-2
@@ -20,8 +20,8 @@ class CreateContainerRemarkLogic extends AbstractControllerLogic
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Created Container Remark',
|
||||
'message' => 'You have successfully created a new Container Remark'
|
||||
'title' => 'Created Container',
|
||||
'message' => 'You have successfully created a new Container'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -142,6 +142,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
||||
$containers = $this->fetchesDataFRomVTPortal->getResponseBody($containersRequest);
|
||||
|
||||
foreach ($containers->Rows as $container){
|
||||
|
||||
$filter = '["ContainerID:=%js%'.$container[11].'"]';
|
||||
$containerDetailRequest = $this->fetchesDataFRomVTPortal->clientRequest('http://portal.vtnation.com.my/Services/DataControllerService.asmx/GetPage', 'POST', json_decode('{"controller":"VPodetailparcel","view":"grid1","request":{"PageIndex":-1,"PageSize":10000,"SortExpression":"CreatedOn asc","Filter":'.$filter.'}}'), '');
|
||||
|
||||
|
||||
+3
-4
@@ -310,8 +310,7 @@ class FetchOrderListsFromYdPortalProcessor
|
||||
if($containerReference) {
|
||||
try {
|
||||
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
|
||||
$container->packingLists()->detach($packingList);
|
||||
$container->packingLists()->attach($packingList);
|
||||
$container->packingLists()->syncWithoutDetaching([$packingList->id]);
|
||||
} catch (ResourceNotFoundException $exception){
|
||||
|
||||
if (!$allow_contract) {
|
||||
@@ -327,8 +326,8 @@ class FetchOrderListsFromYdPortalProcessor
|
||||
/** @var Container $container */
|
||||
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
|
||||
|
||||
$container->packingLists()->detach($packingList);
|
||||
$container->packingLists()->attach($packingList);
|
||||
$container->packingLists()->detach($packingList);
|
||||
$container->packingLists()->attach($packingList);
|
||||
|
||||
$transport = $container->transports()->first();
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ class FetchPackingListFromVTPortalProcessor
|
||||
})->get();
|
||||
|
||||
foreach($packingLists as $packingList){
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
@@ -59,7 +60,9 @@ class FetchPackingListFromVTPortalProcessor
|
||||
$shippingPackingListsRequest = $this->fetchesDataFRomVTPortal->clientRequest('http://portal.vtnation.com.my/Services/DataControllerService.asmx/GetPage', 'POST', json_decode('{"controller":"VPodetailparcel","view":"grid1","request":{"PageIndex":-1,"PageSize":10000,"SortExpression":"CreatedOn asc","Filter":'.$filter.'}}'), '');
|
||||
|
||||
$shippingPackingLists = $this->fetchesDataFRomVTPortal->getResponseBody($shippingPackingListsRequest);
|
||||
|
||||
if(count($shippingPackingLists->Rows)) {
|
||||
|
||||
$packingList->packages()->delete();
|
||||
|
||||
$replica = $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
|
||||
|
||||
@@ -12,12 +12,14 @@ class UpdatesPackingListOwner extends AbstractUpdateRelationshipRecord
|
||||
|
||||
/**
|
||||
* @param PackingList $model
|
||||
* @param Packable $packable
|
||||
* @param int $status
|
||||
* @return \Illuminate\Database\Eloquent\Model
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
*/
|
||||
public function execute(PackingList $model, Packable $packable) {
|
||||
|
||||
$model->status = ApprovalStatus::APPROVED;
|
||||
|
||||
return $this->handler($packable->packingLists(), $model);
|
||||
|
||||
}
|
||||
|
||||
@@ -4,16 +4,18 @@ namespace App\Classes\Modules\Remarks\ControllersLogic;
|
||||
|
||||
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Remarks\Services\CreatesRemark;
|
||||
use App\Classes\Modules\Remarks\Standards\Rules\CanCreateRemark;
|
||||
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
|
||||
use App\Classes\Modules\Remarks\Processors\CreateRemarkProcessor;
|
||||
use App\Classes\Modules\Accounts\Services\FetchesUser;
|
||||
use App\Http\Resources\RemarkResource;
|
||||
use ErrorException;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Str;
|
||||
use App\Classes\Exceptions\MalformedRequestException;
|
||||
use App\Http\Resources\RemarkResource;
|
||||
|
||||
class CreateRemarkLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@@ -24,16 +26,25 @@ class CreateRemarkLogic extends AbstractControllerLogic
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CreateRemarkProcessor */
|
||||
private $createRemarkProcessor;
|
||||
/** @var CanCreateRemark */
|
||||
private $canCreateRemark;
|
||||
|
||||
/** @var CreatesRemark */
|
||||
private $createsRemark;
|
||||
|
||||
/** @var FetchesUser */
|
||||
private $fetchesUser;
|
||||
|
||||
/**
|
||||
* CreateRemarkLogic constructor.
|
||||
* @param CreateRemarkProcessor $createRemarkProcessor
|
||||
* @param CanCreateRemark $canCreateRemark
|
||||
* @param CreatesRemark $createsRemark
|
||||
*/
|
||||
public function __construct(CreateRemarkProcessor $createRemarkProcessor)
|
||||
public function __construct(CanCreateRemark $canCreateRemark, CreatesRemark $createsRemark, FetchesUser $fetchesUser)
|
||||
{
|
||||
$this->createRemarkProcessor = $createRemarkProcessor;
|
||||
$this->canCreateRemark = $canCreateRemark;
|
||||
$this->createsRemark = $createsRemark;
|
||||
$this->fetchesUser = $fetchesUser;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,18 +56,15 @@ class CreateRemarkLogic extends AbstractControllerLogic
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$classs = '\\App\\Models\\' . Str::studly($request->input('model_type'));
|
||||
|
||||
if (!class_exists($classs)) {
|
||||
throw new MalformedRequestException('Unable to process this entity');
|
||||
}
|
||||
|
||||
$remarkOwner = $classs::find($request->route('id'));
|
||||
$object = new RemarkObject($request->input('content'), $request->input('commenter_id'));
|
||||
|
||||
$remarkObject = new RemarkObject($request->input('content'), auth()->user()->id);
|
||||
$this->canCreateRemark->passes($object);
|
||||
|
||||
$remmark = $this->createRemarkProcessor->execute($remarkOwner, $remarkObject);
|
||||
$query = $this->createsRemark->execute($this->fetchesUser->execute(['id' => $request->input('commenter_id')]), $object);
|
||||
|
||||
return $this->resourceResponse(new RemarkResource($query));
|
||||
|
||||
return $this->resourceResponse(new RemarkResource($remmark));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class UpdateConstantLogic extends AbstractControllerLogic
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
|
||||
$object = new ConstantObject($request->input('reference'), $request->input('value'));
|
||||
$object = new ConstantObject($request->input('name'), $request->input('reference'), $request->input('detail'));
|
||||
|
||||
$segment = $this->fetchesSegment->execute(['id' => $request->route('id')]);
|
||||
|
||||
|
||||
@@ -1,99 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Segments\ControllersLogic;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use App\Http\Resources\ConstantResource;
|
||||
use App\Classes\ValueObjects\Constants\SegmentConstants;
|
||||
use App\Classes\Modules\Segments\Services\FetchesSegment;
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Segments\Services\FetchesConstant;
|
||||
use App\Classes\Modules\Segments\Services\UpdatesConstant;
|
||||
use App\Classes\Modules\Segments\Standards\Rules\CanUpdateConstant;
|
||||
use App\Classes\Modules\Segments\DataTransferObjects\ConstantObject;
|
||||
use App\Classes\Modules\Segments\Services\AddItemToConstantValueArray;
|
||||
use App\Classes\Modules\Segments\Services\RemoveItemFromConstantValueArray;
|
||||
|
||||
class UpdateConstantPostcodeLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated Segment Constant',
|
||||
'message' => 'You have successfully updated the Segment Constant'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanUpdateConstant */
|
||||
private $canUpdateConstant;
|
||||
|
||||
/** @var UpdatesConstant */
|
||||
private $updatesConstant;
|
||||
|
||||
/** @var FetchesSegment */
|
||||
private $fetchesSegment;
|
||||
|
||||
/** @var FetchesConstant */
|
||||
private $fetchesConstant;
|
||||
|
||||
/** @var AddItemToConstantValueArray */
|
||||
private $addItemToConstantValueArray;
|
||||
|
||||
/** @var RemoveItemFromConstantValueArray */
|
||||
private $removeItemFromConstantValueArray;
|
||||
|
||||
|
||||
/**
|
||||
* UpdateConstantLogic constructor.
|
||||
* @param CanUpdateConstant $canUpdateConstant
|
||||
* @param UpdatesConstant $updatesConstant
|
||||
* @param FetchesSegment $fetchesSegment
|
||||
* @param FetchesConstant $fetchesConstant
|
||||
* @param AddItemToConstantValueArray $addItemToConstantValueArray
|
||||
* @param RemoveItemFromConstantValueArray $removeItemFromConstantValueArray
|
||||
*/
|
||||
public function __construct(CanUpdateConstant $canUpdateConstant, UpdatesConstant $updatesConstant, FetchesSegment $fetchesSegment, FetchesConstant $fetchesConstant,AddItemToConstantValueArray $addItemToConstantValueArray, RemoveItemFromConstantValueArray $removeItemFromConstantValueArray)
|
||||
{
|
||||
$this->canUpdateConstant = $canUpdateConstant;
|
||||
$this->updatesConstant = $updatesConstant;
|
||||
$this->fetchesSegment = $fetchesSegment;
|
||||
$this->fetchesConstant = $fetchesConstant;
|
||||
$this->addItemToConstantValueArray = $addItemToConstantValueArray;
|
||||
$this->removeItemFromConstantValueArray = $removeItemFromConstantValueArray;
|
||||
}
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$segment = $this->fetchesSegment->execute(['id' => $request->route('id')]);
|
||||
|
||||
$constant = $this->fetchesConstant->execute(['segment_id' => $segment->id, 'reference' => $request->input('reference')]);
|
||||
|
||||
$object = new ConstantObject($constant->reference, $this->addItemToConstantValueArray->execute($constant->value, $request->input('postcode')));
|
||||
$this->canUpdateConstant->passes($object);
|
||||
|
||||
$constant = $this->updatesConstant->execute($constant, $object);
|
||||
|
||||
$oppositeConstant = $this->fetchesConstant->execute(['segment_id' => $segment->id, 'reference' => $request->input('reference') == SegmentConstants::CENTER_POSTCODE ? SegmentConstants::OUTSTATION_POSTCODE : SegmentConstants::CENTER_POSTCODE]);
|
||||
|
||||
$oppositeObject = new ConstantObject($request->input('reference') == SegmentConstants::CENTER_POSTCODE ? SegmentConstants::OUTSTATION_POSTCODE : SegmentConstants::CENTER_POSTCODE, $this->removeItemFromConstantValueArray->execute($oppositeConstant->value, $request->input('postcode')));
|
||||
|
||||
$oppositeConstant = $this->updatesConstant->execute($oppositeConstant, $oppositeObject);
|
||||
|
||||
|
||||
return $this->response([
|
||||
'CENTER_POSTCODE' => $constant->reference == SegmentConstants::CENTER_POSTCODE ? new ConstantResource($constant) : New ConstantResource($oppositeConstant),
|
||||
'OUTSTATION_POSTCODE' => $constant->reference == SegmentConstants::OUTSTATION_POSTCODE ? new ConstantResource($constant) : New ConstantResource($oppositeConstant),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Segments\ControllersLogic;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\SegmentConstant;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use App\Http\Resources\ConstantResource;
|
||||
use App\Classes\ValueObjects\Constants\SegmentConstants;
|
||||
use App\Classes\Modules\Segments\Services\FetchesSegment;
|
||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||
use App\Classes\Modules\Segments\Services\FetchesConstant;
|
||||
use App\Classes\Modules\Segments\Services\UpdatesConstant;
|
||||
use App\Classes\Modules\Segments\Standards\Rules\CanUpdateConstant;
|
||||
use App\Classes\Modules\Segments\DataTransferObjects\ConstantObject;
|
||||
use App\Classes\Modules\Segments\Services\UpdatesConstantValueByState;
|
||||
|
||||
class UpdateConstantStateLogic extends AbstractControllerLogic
|
||||
{
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
protected function notification():array {
|
||||
return [
|
||||
'title' => 'Updated Segment Constant',
|
||||
'message' => 'You have successfully updated the Segment Constant'
|
||||
];
|
||||
}
|
||||
|
||||
/** @var CanUpdateConstant */
|
||||
private $canUpdateConstant;
|
||||
|
||||
/** @var UpdatesConstant */
|
||||
private $updatesConstant;
|
||||
|
||||
/** @var FetchesSegment */
|
||||
private $fetchesSegment;
|
||||
|
||||
/** @var FetchesConstant */
|
||||
private $fetchesConstant;
|
||||
|
||||
/** @var UpdatesConstantValueByState */
|
||||
private $updatesConstantValueByState;
|
||||
|
||||
|
||||
/**
|
||||
* UpdateConstantLogic constructor.
|
||||
* @param CanUpdateConstant $canUpdateConstant
|
||||
* @param UpdatesConstant $updatesConstant
|
||||
* @param FetchesSegment $fetchesSegment
|
||||
* @param FetchesConstant $fetchesConstant
|
||||
* @param UpdatesConstantValueByState $updatesConstantValueByState
|
||||
*/
|
||||
public function __construct(CanUpdateConstant $canUpdateConstant, UpdatesConstant $updatesConstant, FetchesSegment $fetchesSegment, FetchesConstant $fetchesConstant,UpdatesConstantValueByState $updatesConstantValueByState)
|
||||
{
|
||||
$this->canUpdateConstant = $canUpdateConstant;
|
||||
$this->updatesConstant = $updatesConstant;
|
||||
$this->fetchesSegment = $fetchesSegment;
|
||||
$this->fetchesConstant = $fetchesConstant;
|
||||
$this->updatesConstantValueByState = $updatesConstantValueByState;
|
||||
}
|
||||
/**
|
||||
* @param Request $request
|
||||
* @return JsonResponse
|
||||
* @throws \App\Classes\Exceptions\AccessForbiddenException
|
||||
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||
* @throws \App\Classes\Exceptions\RequestValidationException
|
||||
*/
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$segment = $this->fetchesSegment->execute(['id' => $request->route('id')]);
|
||||
|
||||
$constant = $this->fetchesConstant->execute(['segment_id' => $segment->id, 'reference' => SegmentConstants::STATE_RATE]);
|
||||
|
||||
$constantValue = $this->updatesConstantValueByState->execute($constant->value, $request->input('status_id'), $request->input('rate'));
|
||||
|
||||
$object = new ConstantObject(SegmentConstants::STATE_RATE, (array) $constantValue);
|
||||
$this->canUpdateConstant->passes($object);
|
||||
|
||||
$constant = $this->updatesConstant->execute($constant, $object);
|
||||
|
||||
|
||||
return $this->resourceResponse(new ConstantResource($constant));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,22 +7,34 @@ use App\Classes\General\Interfaces\DataTransferObject;
|
||||
class ConstantObject implements DataTransferObject
|
||||
{
|
||||
|
||||
/** @var string */
|
||||
private $name;
|
||||
|
||||
/** @var string */
|
||||
private $reference;
|
||||
|
||||
/** @var array */
|
||||
private $value;
|
||||
private $detail;
|
||||
|
||||
/**
|
||||
* ConstantObject constructor.
|
||||
* @param string $name
|
||||
* @param string $reference
|
||||
* @param array $value
|
||||
* @param array $detail
|
||||
*/
|
||||
public function __construct(string $reference, array $value)
|
||||
public function __construct(string $name, string $reference, array $detail)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->reference = $reference;
|
||||
$this->value = $value;
|
||||
$this->detail = $detail;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -36,9 +48,9 @@ class ConstantObject implements DataTransferObject
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getValue(): array
|
||||
public function getDetail(): array
|
||||
{
|
||||
return $this->value;
|
||||
return $this->detail;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Segments\Services;
|
||||
|
||||
class AddItemToConstantValueArray
|
||||
{
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @param $item
|
||||
* @return array
|
||||
*/
|
||||
public function execute($array, $item): array {
|
||||
$array[] = $item;
|
||||
sort($array);
|
||||
return $array;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,11 +27,11 @@ class ConvertsConstantDetailsToResource
|
||||
|
||||
public function execute(SegmentConstant $constant){
|
||||
|
||||
// if($constant->reference === SegmentConstants::SUPPLIER_CURRENCIES) {
|
||||
// return property_exists($constant->detail, 'id') ? new CurrencyResource($this->fetchesCurrency->execute(['id' => $constant->detail->id])) : '';
|
||||
// }
|
||||
if($constant->reference === SegmentConstants::SUPPLIER_CURRENCIES) {
|
||||
return property_exists($constant->detail, 'id') ? new CurrencyResource($this->fetchesCurrency->execute(['id' => $constant->detail->id])) : '';
|
||||
}
|
||||
|
||||
return $constant->value;
|
||||
return $constant->detail;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,9 @@ class CreatesConstant extends AbstractUpdateRelationshipRecord
|
||||
public function execute(Segment $segment, ConstantObject $object)
|
||||
{
|
||||
$model = new SegmentConstant();
|
||||
$model->name = $object->getName();
|
||||
$model->reference = $object->getReference();
|
||||
$model->value = json_encode($object->getValue());
|
||||
$model->detail = json_encode($object->getDetail());
|
||||
|
||||
return $this->handler($segment->constants(), $model);
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Segments\Services;
|
||||
|
||||
class RemoveItemFromConstantValueArray
|
||||
{
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
* @param $item
|
||||
* @return array
|
||||
*/
|
||||
public function execute($array, $item): array {
|
||||
foreach($array as $key => $value){
|
||||
if($array[$key] == $item){
|
||||
unset($array[$key]);
|
||||
}
|
||||
}
|
||||
return array_values($array);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,8 +17,9 @@ class UpdatesConstant extends AbstractUpdateRecord
|
||||
*/
|
||||
public function execute(SegmentConstant $model, ConstantObject $object)
|
||||
{
|
||||
$model->name = $object->getName();
|
||||
$model->reference = $object->getReference();
|
||||
$model->value = json_encode($object->getValue());
|
||||
$model->detail = json_encode($object->getDetail());
|
||||
|
||||
return $this->handler($model);
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\Modules\Segments\Services;
|
||||
|
||||
class UpdatesConstantValueByState
|
||||
{
|
||||
|
||||
/**
|
||||
* @param $json
|
||||
* @param int $status_id
|
||||
* @param int $rate
|
||||
* @return string
|
||||
*/
|
||||
public function execute($json, int $status_id, int $rate) {
|
||||
|
||||
$newArray = $json;
|
||||
foreach($json->config as $key => $object){
|
||||
if($object->status_id == $status_id){
|
||||
$newArray->config[$key] = (object) [
|
||||
'rate' => $rate,
|
||||
'status_id' => $object->status_id,
|
||||
'outstation_rate' => $object->outstation_rate,
|
||||
];
|
||||
}else{
|
||||
$newArray->config[$key] = $object;
|
||||
}
|
||||
}
|
||||
return $newArray;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,8 +15,9 @@ class ConstantValidation extends AbstractValidation
|
||||
protected function data($object): array {
|
||||
|
||||
$data = [
|
||||
'name' => $object->getName(),
|
||||
'reference' => $object->getReference(),
|
||||
'value' => $object->getValue()
|
||||
'detail' => $object->getDetail()
|
||||
];
|
||||
|
||||
return $data;
|
||||
@@ -27,8 +28,9 @@ class ConstantValidation extends AbstractValidation
|
||||
*/
|
||||
protected function rules(): array {
|
||||
return [
|
||||
'name' => 'required',
|
||||
'reference' => 'required',
|
||||
'value' => 'required'
|
||||
'detail' => 'required'
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+18
-53
@@ -8,37 +8,29 @@ use App\Classes\Modules\PackingLists\Services\FetchesPackingList;
|
||||
use App\Classes\Modules\SegmentConstants\Services\FetchesSegmentConstant;
|
||||
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
|
||||
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
|
||||
use App\Classes\Modules\Transactions\Services\CreatesTransactionDetail;
|
||||
use App\Classes\Modules\Documents\Services\CreatesDocument;
|
||||
use App\Classes\Modules\Documents\Services\CreatesFiles;
|
||||
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionObject;
|
||||
use App\Classes\Modules\Transactions\DataTransferObjects\TransactionDetailObject;
|
||||
use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Classes\ValueObjects\Constants\PaymentMethodType;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
use App\Classes\ValueObjects\Constants\DocumentType;
|
||||
|
||||
// use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
|
||||
// use App\Classes\Modules\Transactions\Services\FetchesTransaction;
|
||||
// use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
|
||||
|
||||
// use App\Classes\Modules\Documents\Services\CreatesDocument;
|
||||
// use App\Classes\Modules\Documents\Services\CreatesFiles;
|
||||
// use App\Classes\ValueObjects\Constants\DocumentType;
|
||||
// use App\Models\Document;
|
||||
// use App\Models\Transaction;
|
||||
// use Barryvdh\DomPDF\PDF;
|
||||
// use Carbon\Carbon;
|
||||
|
||||
|
||||
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
// use Meneses\LaravelLaravelMpdf\Facades\LaravelLaravelMpdf;
|
||||
use Meneses\LaravelMpdf\Facades\LaravelMpdf;
|
||||
// use Meneses\LaravelMpdf\Facades\LaravelMpdf;
|
||||
|
||||
class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
|
||||
{
|
||||
@@ -66,16 +58,8 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
|
||||
/** @var CreatesTransaction */
|
||||
private $createsTransaction;
|
||||
|
||||
/** @var CreatesTransactionDetail */
|
||||
private $createsTransactionDetail;
|
||||
|
||||
/** @var CreatesDocument */
|
||||
private $createsDocument;
|
||||
|
||||
/** @var CreatesFiles */
|
||||
private $createsFile;
|
||||
|
||||
// /** @var FetchesTransaction */
|
||||
// private $fetchesTransaction;
|
||||
// /** @var UpdatesTransactionStatus */
|
||||
// private $updatesTransactionStatus;
|
||||
// /** @var CreatesDocument */
|
||||
@@ -84,16 +68,23 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
|
||||
// private $createsFile;
|
||||
// /** @var PDF */
|
||||
// private $pdf;
|
||||
|
||||
|
||||
/**
|
||||
* CreateSupplierTransactionLogic constructor.
|
||||
* @param FetchesPackingList $fetchesPackingList
|
||||
* @param GeneratesTransactionBillNumber $generatesTransactionBillNumber
|
||||
* @param CreatesTransaction $createsTransaction
|
||||
* @param FetchesTransaction $fetchesTransaction
|
||||
* @param UpdatesTransactionStatus $updatesTransactionStatus
|
||||
* @param PDF $pdf
|
||||
*/
|
||||
public function __construct(
|
||||
FetchesPackingList $fetchesPackingList,
|
||||
FetchesSegmentConstant $fetchesSegmentConstant,
|
||||
GeneratesTransactionBillNumber $generatesTransactionBillNumber,
|
||||
CreatesTransaction $createsTransaction,
|
||||
CreatesTransactionDetail $createsTransactionDetail,
|
||||
CreatesDocument $createsDocument,
|
||||
CreatesFiles $createsFile
|
||||
CreatesTransaction $createsTransaction
|
||||
|
||||
// UpdatesTransactionStatus $updatesTransactionStatus,
|
||||
// CreatesDocument $createsDocument,
|
||||
// CreatesFiles $createsFile,
|
||||
// PDF $pdf
|
||||
@@ -104,9 +95,6 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
|
||||
$this->fetchesSegmentConstant = $fetchesSegmentConstant;
|
||||
$this->generatesTransactionBillNumber = $generatesTransactionBillNumber;
|
||||
$this->createsTransaction = $createsTransaction;
|
||||
$this->createsTransactionDetail = $createsTransactionDetail;
|
||||
$this->createsDocument = $createsDocument;
|
||||
$this->createsFile = $createsFile;
|
||||
|
||||
// $this->updatesTransactionStatus = $updatesTransactionStatus;
|
||||
// $this->createsDocument = $createsDocument;
|
||||
@@ -197,31 +185,8 @@ class CreateShippingInvoiceTransactionLogic extends AbstractControllerLogic
|
||||
ApprovalStatus::PENDING_SUBMISSION
|
||||
);
|
||||
|
||||
$invoice_transaction = $this->createsTransaction->execute($packing_list, $object);
|
||||
$transactions = $this->createsTransaction->execute($packing_list, $object);
|
||||
|
||||
$object_detail = new TransactionDetailObject(
|
||||
$invoice_transaction->bill_no,
|
||||
$invoice_transaction->bill_no,
|
||||
1,
|
||||
$invoice_transaction->amount,
|
||||
$invoice_transaction->amount
|
||||
);
|
||||
$transaction_detail = $this->createsTransactionDetail->execute($invoice_transaction, $object_detail);
|
||||
|
||||
$transaction_invoice_pdf = LaravelMpdf::loadView('pages.pdfs.shipping_invoice', ['invoice_transaction' => $invoice_transaction]);
|
||||
|
||||
$document_object = new DocumentObject(
|
||||
DocumentType::SHIPPING_INVOICE,
|
||||
[chunk_split('data:application/pdf;base64,'.base64_encode($transaction_invoice_pdf->output()))],
|
||||
'',
|
||||
ApprovalStatus::COMPLETED,
|
||||
'shipping_invoice'
|
||||
);
|
||||
/** @var Document $document */
|
||||
$document = $this->createsDocument->execute($invoice_transaction, $document_object);
|
||||
$this->createsFile->execute($document, $document_object);
|
||||
|
||||
// dd('yess');
|
||||
return $this->response([]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ class CreatesTransactionDetail extends AbstractUpdateRelationshipRecord
|
||||
*/
|
||||
public function execute(Transaction $transaction, TransactionDetailObject $object) {
|
||||
$model = new TransactionDetail();
|
||||
$model->reference = $object->getReference();
|
||||
$model->name = $object->getName();
|
||||
$model->product_code = $object->getCode();
|
||||
$model->product_name = $object->getName();
|
||||
$model->quantity = $object->getQuantity();
|
||||
$model->price = $object->getPrice();
|
||||
$model->amount = $object->getAmount();
|
||||
|
||||
@@ -21,8 +21,4 @@ final class DocumentType {
|
||||
public const DELIVER_ORDER = 'DELIVER_ORDER';
|
||||
public const INVOICE = 'INVOICE';
|
||||
public const SUPPLIER_DELIVER_ORDER = 'SUPPLIER_DELIVER_ORDER';
|
||||
|
||||
|
||||
public const SHIPPING_INVOICE = 'SHIPPING_INVOICE';
|
||||
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes\ValueObjects\Constants;
|
||||
|
||||
|
||||
final class NotificationType
|
||||
{
|
||||
|
||||
public const SUPERVISOR = 0;
|
||||
|
||||
}
|
||||
@@ -2,15 +2,13 @@
|
||||
|
||||
namespace App\Classes\ValueObjects\Constants;
|
||||
|
||||
|
||||
class Notifications
|
||||
{
|
||||
public const NEW_ARRIVED_PARCEL = [
|
||||
'title' => 'New Arrived Parcel',
|
||||
'message' => 'you have received new parcel for your order #-'
|
||||
];
|
||||
|
||||
public const UNDEFINED = [
|
||||
'title' => 'UNDEFINED TITLE',
|
||||
'message' => 'undefined message'
|
||||
'title' => 'Unknown Action',
|
||||
'message' => 'unknown message..'
|
||||
];
|
||||
|
||||
}
|
||||
@@ -41,8 +41,5 @@ final class WarehouseReferences {
|
||||
|
||||
public const YD_DESTINATION_WAREHOUSE = self::YD_KLANG;
|
||||
|
||||
public const YD_EXEMPT_LIST = [230, 294, 320, 652, 1248, 1726];
|
||||
|
||||
//2376 qce
|
||||
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Companies;
|
||||
|
||||
use App\Classes\Modules\Companies\ControllersLogic\ListCompanyModulesLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ListCompanyModulesController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param ListCompanyModulesLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function list(Request $request, ListCompanyModulesLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Orders;
|
||||
|
||||
use App\Classes\Modules\Orders\ControllersLogic\CreateOrderRemarkLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class CreateOrderRemarkController
|
||||
{
|
||||
public function create(Request $request, CreateOrderRemarkLogic $logic): JsonResponse{
|
||||
return $logic->execute($request);
|
||||
}
|
||||
}
|
||||
@@ -23,11 +23,8 @@ class DownloadOrderQrPdfController
|
||||
|
||||
$warehousePrefix = '';
|
||||
$deliveryPrefix = '';
|
||||
$customerMarking = '';
|
||||
$remark = $warehouse->remarks()->first()->content;
|
||||
|
||||
if($warehouse->reference === WarehouseReferences::VT_GUANG_ZHOU || $warehouse->reference === WarehouseReferences::VT_YIWU) {
|
||||
$customerMarking = $order->companyModule->connections()->first()->invitee_reference.'/';
|
||||
if(strtolower($deliveryAddress->state->name) === 'sabah' || strtolower($deliveryAddress->state->name) === 'labuan') {
|
||||
$deliveryPrefix = 'SB/';
|
||||
}
|
||||
@@ -56,11 +53,10 @@ class DownloadOrderQrPdfController
|
||||
|
||||
$data = [
|
||||
'order' => $order,
|
||||
'marking' => $warehousePrefix.$deliveryPrefix.'CIEF/'.$customerMarking,
|
||||
'marking' => $warehousePrefix.$deliveryPrefix.'CIEF/'.$order->companyModule->connections()->first()->invitee_reference,
|
||||
'delivery_address' => $deliveryAddress,
|
||||
'warehouse_address' => $warehouseAddress,
|
||||
'warehouse_contacts' => $warehouseContacts,
|
||||
'remark' => $remark
|
||||
];
|
||||
|
||||
$pdf = LaravelMpdf::loadView('pdfs.qr', $data, [], [
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Segments;
|
||||
|
||||
use App\Classes\Modules\Segments\ControllersLogic\UpdateConstantPostcodeLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UpdateConstantPostcodeController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param UpdateConstantPostcodeLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, UpdateConstantPostcodeLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Segments;
|
||||
|
||||
use App\Classes\Modules\Segments\ControllersLogic\UpdateConstantStateLogic;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UpdateConstantStateController
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param UpdateConstantStateLogic $logic
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, UpdateConstantStateLogic $logic): JsonResponse {
|
||||
return $logic->execute($request);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -39,7 +39,6 @@ class CompanyModuleResource extends JsonResource
|
||||
'reference' => $this->reference,
|
||||
'address' => new AddressResource($defaultAddress),
|
||||
'company' => new CompanyResource($this->whenLoaded('company')),
|
||||
'remarks' => RemarkResource::collection($this->remarks),
|
||||
'marking' => $marking
|
||||
];
|
||||
|
||||
|
||||
@@ -19,8 +19,9 @@ class ConstantResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'reference' => $this->reference,
|
||||
'value' => (App()->make(ConvertsConstantDetailsToResource::class))->execute($this->resource)
|
||||
'detail' => (App()->make(ConvertsConstantDetailsToResource::class))->execute($this->resource)
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,9 +30,7 @@ class ContainerResource extends JsonResource
|
||||
'remarks' => RemarkResource::collection($this->remarks),
|
||||
'status' => $this->status,
|
||||
'packing_lists' => $this->whenLoaded('packingLists', PackingListResource::collection($this->whenLoaded('packingLists', function(){
|
||||
return $this->packingLists()->whereHas('packages')->get()->sortBy(function ($packingList) {
|
||||
return $packingList->owner->company_module_id;
|
||||
});
|
||||
return $this->packingLists()->whereHas('packages')->get();
|
||||
})))
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class CountryResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'short_code' => $this->short_code,
|
||||
'phone_code' => $this->phone_code,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -2,11 +2,8 @@
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\PackingListType;
|
||||
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Classes\ValueObjects\Constants\RoleTypes;
|
||||
use App\Models\Order;
|
||||
use App\Models\PackingList;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class PackingListResource extends JsonResource
|
||||
@@ -29,12 +26,10 @@ class PackingListResource extends JsonResource
|
||||
'status' => $this->status,
|
||||
'transport' => new TransportResource($this->transports()->first()),
|
||||
'type' => $this->type,
|
||||
'receive_packing_list' => $this->when($this->type === PackingListType::SHIPPING_PACKING_LIST, new PackingListResource(PackingList::where('reference', $this->reference)->where('type', PackingListType::WAREHOUSE_RECEIVE_LIST)->first())),
|
||||
'packages' => PackageResource::collection($packages),
|
||||
$this->mergeWhen($this->owner instanceof Order, [
|
||||
'order' => New OrderResource($this->owner)
|
||||
]),
|
||||
'shippng_transaction' => new TransactionResource($this->transactions()->where('type', TransactionType::SHIPPING_INVOICE)->first()),
|
||||
])
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class TransactionResource extends JsonResource
|
||||
|
||||
return [
|
||||
'id' => $this->id,
|
||||
// 'booking' => new BookingResource($this->booking),
|
||||
'booking' => new BookingResource($this->booking),
|
||||
'type' => (int) $this->type,
|
||||
'bill_no' => $this->bill_no,
|
||||
'amount' => (double) $this->amount,
|
||||
|
||||
@@ -3,39 +3,11 @@
|
||||
namespace App\Models;
|
||||
|
||||
|
||||
use App\Classes\General\Interfaces\Notifiable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Spatie\Activitylog\Traits\LogsActivity;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
|
||||
class AbstractModel extends Model implements Notifiable
|
||||
class AbstractModel extends Model
|
||||
{
|
||||
use LogsActivity;
|
||||
protected static $logFillable = true;
|
||||
|
||||
/**
|
||||
* @return MorphTo
|
||||
*/
|
||||
public function subject(): MorphTo
|
||||
{
|
||||
return $this->MorphTo('subject');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphTo
|
||||
*/
|
||||
public function target(): MorphTo
|
||||
{
|
||||
return $this->MorphTo('target');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphTo
|
||||
*/
|
||||
public function causer(): MorphTo
|
||||
{
|
||||
return $this->MorphTo('causer');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -21,9 +21,6 @@ use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use PhpParser\Node\Expr\AssignOp\Mod;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasManyDeep;
|
||||
use Staudenmeir\EloquentHasManyDeep\HasRelationships;
|
||||
use App\Classes\General\Interfaces\Remarkable;
|
||||
|
||||
/**
|
||||
* Class CompanyModule
|
||||
@@ -33,9 +30,8 @@ use App\Classes\General\Interfaces\Remarkable;
|
||||
* @property integer type
|
||||
* @property integer status
|
||||
*/
|
||||
class CompanyModule extends AbstractModel implements Addressable, Documentable, Contactable, ContainerOwner, Packable, Remarkable
|
||||
class CompanyModule extends AbstractModel implements Addressable, Documentable, Contactable, ContainerOwner, Packable
|
||||
{
|
||||
use HasRelationships;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'company_modules';
|
||||
@@ -74,14 +70,6 @@ class CompanyModule extends AbstractModel implements Addressable, Documentable,
|
||||
return $this->morphMany(PackingList::class, 'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return hasManyDeep
|
||||
*/
|
||||
public function orderPackingLists(): hasManyDeep
|
||||
{
|
||||
return $this->hasManyDeep(PackingList::class, [Order::class], ['company_module_id', ['owner_type', 'owner_id']], ['id', null]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return belongsToMany
|
||||
*/
|
||||
@@ -178,14 +166,6 @@ class CompanyModule extends AbstractModel implements Addressable, Documentable,
|
||||
return $query->where('type', '=', BusinessType::WAREHOUSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return MorphMany
|
||||
*/
|
||||
public function remarks(): morphMany
|
||||
{
|
||||
return $this->morphMany(Remark::class, 'owner');
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
class Notification extends AbstractModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
protected $table = 'notifications';
|
||||
|
||||
public function package(): BelongsTo
|
||||
{
|
||||
return $this->BelongsTo(Package::class, 'package_id', 'id');
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@ use App\Classes\General\Interfaces\Addressable;
|
||||
use App\Classes\General\Interfaces\Contactable;
|
||||
use App\Classes\General\Interfaces\Packable;
|
||||
use App\Classes\General\Interfaces\Remarkable;
|
||||
use App\Classes\General\Interfaces\Notifiable;
|
||||
use App\Classes\ValueObjects\Constants\PackingListType;
|
||||
use App\Classes\ValueObjects\Constants\RoleTypes;
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
@@ -17,7 +16,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
|
||||
class Order extends AbstractModel implements Addressable, Packable, Remarkable, Notifiable
|
||||
class Order extends AbstractModel implements Addressable, Packable, Remarkable
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
@@ -154,8 +153,8 @@ class Order extends AbstractModel implements Addressable, Packable, Remarkable,
|
||||
/**
|
||||
* @return morphMany
|
||||
*/
|
||||
// public function transactions(): morphMany
|
||||
// {
|
||||
// return $this->morphMany(Transaction::class, 'owner');
|
||||
// }
|
||||
public function transactions(): morphMany
|
||||
{
|
||||
return $this->morphMany(Transaction::class, 'owner');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphMany;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
|
||||
|
||||
class Transaction extends AbstractModel implements Documentable
|
||||
{
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||
|
||||
class CreateNotificationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('title');
|
||||
$table->text('description');
|
||||
$table->morphs('subject');
|
||||
$table->morphs('target');
|
||||
$table->morphs('causer');
|
||||
$table->integer('status')->default(ApprovalStatus::APPROVED);
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('notifications');
|
||||
}
|
||||
}
|
||||
-180
@@ -1,180 +0,0 @@
|
||||
<template>
|
||||
<div class="row" v-if="company">
|
||||
<div class="col">
|
||||
<div class="row m-b-30" v-if="$store.getters.isAdmin">
|
||||
<div class="col bg-master-lightest b-rad-lg p-t-10 p-b-15">
|
||||
<customer-profile-component :data="company"></customer-profile-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-show="!$store.getters.isShowing('createOrderForm')">
|
||||
<div class="col">
|
||||
<on-boarding-section-component v-if="!company.last_order"></on-boarding-section-component>
|
||||
<div class="row" v-if="company.last_order">
|
||||
<div class="col">
|
||||
<!-- new swction -->
|
||||
<div class="row tabsContainer">
|
||||
<div class="col no-padding">
|
||||
<div class="row m-l-0 m-r-0">
|
||||
<div class="col">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton active" tab-name="arrivedParcel">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<img src="https://img.icons8.com/dotty/35/000000/cargo-ship.png"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Arrived Parcel</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-inline m-l-5">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton" tab-name="container">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="35" height="35" viewBox="0 0 172 172" style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#000000"><path d="M86.06719,12.9c-0.25976,-0.00731 -0.5187,0.03252 -0.76426,0.11758l-68.8,23.65c-0.86858,0.29776 -1.45225,1.11422 -1.45293,2.03242v12.9c-0.00043,0.68443 0.325,1.32819 0.8764,1.73365c0.5514,0.40547 1.2629,0.5242 1.91608,0.31977l1.50752,-0.47031v99.46689h19.35h10.75h36.55h2.15h34.4h12.9h17.2v-99.46689l1.50752,0.47031c0.65319,0.20444 1.36468,0.0857 1.91608,-0.31977c0.5514,-0.40547 0.87683,-1.04922 0.8764,-1.73365v-12.9c-0.00068,-0.9182 -0.58435,-1.73466 -1.45293,-2.03242l-68.8,-23.65c-0.20291,-0.07043 -0.41523,-0.11007 -0.62988,-0.11758zM86,17.32178l66.65,22.91094v8.44043l-7.95752,-2.48174c-0.27786,-0.09509 -0.57226,-0.13224 -0.86504,-0.10918l-0.21416,-0.22676l-0.74326,-0.13437l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.67607,0.11758c0.18673,0.12653 0.3922,0.22289 0.60889,0.28555l4.94248,1.54531v96.51064h-10.75v-86h-103.2v86h-10.75v-96.51484l4.94248,-1.54531c0.75045,-0.21514 1.32533,-0.82012 1.50193,-1.58056c0.1766,-0.76044 -0.07284,-1.55685 -0.65168,-2.08069c-0.57883,-0.52383 -1.39612,-0.69278 -2.13521,-0.44139l-7.95752,2.48594v-8.44043zM85.40791,28.13477l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.40674zM93.61738,30.33096l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM77.20264,30.70049l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31856,-1.40674zM101.82686,32.89668l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM68.99316,33.26621l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM110.03633,35.4624l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM60.78369,35.83193l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.41094zM118.2416,38.02812l-1.72168,0.86084l-0.34014,1.89805l1.31856,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.41094zM52.57422,38.39766l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM126.45107,40.59385l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM44.36895,40.95918l-1.72588,0.86504l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31855,-1.40674zM134.66055,43.15537l-1.72168,0.86504l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31436,-1.40674zM36.15947,43.5249l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31856,-1.40674zM38.7,66.65h94.6v81.7h-10.75v-34.4h-17.2v-34.4h-38.7v2.15v32.25h-17.2v2.15v32.25h-10.75zM70.95,83.85h30.1v30.1h-12.9h-2.15h-15.05zM53.75,118.25h12.9h17.2v30.1h-30.1zM88.15,118.25h17.2h12.9v30.1h-30.1z"></path></g></g></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Container</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-inline m-l-5">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton" tab-name="warehouses">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="35" height="35" viewBox="0 0 172 172" style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#000000"><path d="M86.06719,12.9c-0.25976,-0.00731 -0.5187,0.03252 -0.76426,0.11758l-68.8,23.65c-0.86858,0.29776 -1.45225,1.11422 -1.45293,2.03242v12.9c-0.00043,0.68443 0.325,1.32819 0.8764,1.73365c0.5514,0.40547 1.2629,0.5242 1.91608,0.31977l1.50752,-0.47031v99.46689h19.35h10.75h36.55h2.15h34.4h12.9h17.2v-99.46689l1.50752,0.47031c0.65319,0.20444 1.36468,0.0857 1.91608,-0.31977c0.5514,-0.40547 0.87683,-1.04922 0.8764,-1.73365v-12.9c-0.00068,-0.9182 -0.58435,-1.73466 -1.45293,-2.03242l-68.8,-23.65c-0.20291,-0.07043 -0.41523,-0.11007 -0.62988,-0.11758zM86,17.32178l66.65,22.91094v8.44043l-7.95752,-2.48174c-0.27786,-0.09509 -0.57226,-0.13224 -0.86504,-0.10918l-0.21416,-0.22676l-0.74326,-0.13437l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.67607,0.11758c0.18673,0.12653 0.3922,0.22289 0.60889,0.28555l4.94248,1.54531v96.51064h-10.75v-86h-103.2v86h-10.75v-96.51484l4.94248,-1.54531c0.75045,-0.21514 1.32533,-0.82012 1.50193,-1.58056c0.1766,-0.76044 -0.07284,-1.55685 -0.65168,-2.08069c-0.57883,-0.52383 -1.39612,-0.69278 -2.13521,-0.44139l-7.95752,2.48594v-8.44043zM85.40791,28.13477l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.40674zM93.61738,30.33096l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM77.20264,30.70049l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31856,-1.40674zM101.82686,32.89668l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM68.99316,33.26621l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM110.03633,35.4624l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM60.78369,35.83193l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.41094zM118.2416,38.02812l-1.72168,0.86084l-0.34014,1.89805l1.31856,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.41094zM52.57422,38.39766l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM126.45107,40.59385l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM44.36895,40.95918l-1.72588,0.86504l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31855,-1.40674zM134.66055,43.15537l-1.72168,0.86504l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31436,-1.40674zM36.15947,43.5249l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31856,-1.40674zM38.7,66.65h94.6v81.7h-10.75v-34.4h-17.2v-34.4h-38.7v2.15v32.25h-17.2v2.15v32.25h-10.75zM70.95,83.85h30.1v30.1h-12.9h-2.15h-15.05zM53.75,118.25h12.9h17.2v30.1h-30.1zM88.15,118.25h17.2h12.9v30.1h-30.1z"></path></g></g></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Warehouses</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-margin">
|
||||
<div class="col bg-master-lightest p-1 p-sm-4">
|
||||
<div class="row tabsContainer tabContent" tab-name="arrivedParcel">
|
||||
<div class="col">
|
||||
<list-component section="warehouseListSection" :endpoint="route('api.packing_list.list')" :options="{packing_list_type: 1, packing_list_status: 2, per_page: 5, owner_id: company.id, order_by: {column: 'arrival_date', DESC: true}, with_arrival_date: true}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<parcel-component v-for="packages in data.packages" :data="packages" :key="packages.id"></parcel-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="container">
|
||||
<div class="col">
|
||||
<div class="row align-items-center m-b-5 p-b-10 b-b b-grey muted all-caps fs-10">
|
||||
<div class="col-2">Marking</div>
|
||||
<div class="col text-center">Quantity</div>
|
||||
<div class="col">CBM</div>
|
||||
<div class="col">Overweight CBM</div>
|
||||
<div class="col">Total CBM</div>
|
||||
<div class="col">status</div>
|
||||
<div class="col">Delivery Date</div>
|
||||
</div>
|
||||
<list-component section="arrivedContainerListSection" :endpoint="route('api.packing_list.list')" :options="{'status_in': [2], 'per_page': 5}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<warehouse-packing-list-component :data="data"></warehouse-packing-list-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="warehouses">
|
||||
<div class="col">
|
||||
<div class="row align-items-center m-b-5 p-b-10 b-b b-grey muted all-caps fs-10">
|
||||
<div class="col-2">Marking</div>
|
||||
<div class="col text-center">Quantity</div>
|
||||
<div class="col">CBM</div>
|
||||
<div class="col">Overweight CBM</div>
|
||||
<div class="col">Total CBM</div>
|
||||
<div class="col">status</div>
|
||||
<div class="col">Delivery Date</div>
|
||||
</div>
|
||||
<list-component section="completeContainerListSection" :endpoint="route('api.packing_list.list')" :options="{'status_in': [3], 'per_page': 5}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<warehouse-packing-list-component :data="data"></warehouse-packing-list-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end new swction -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
company_id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
section: 'orderListSection',
|
||||
isLoading: true,
|
||||
company: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pendingQueue () {
|
||||
return this.$store.getters.isInCompleteQueue(this.section);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
pendingQueue(inComplete){
|
||||
if(inComplete){
|
||||
this.fetchCompany();
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.$store.dispatch('updateListQueue', {'name': this.section});
|
||||
},
|
||||
methods: {
|
||||
fetchCompany(){
|
||||
this.isLoading = true;
|
||||
this.submit(route('api.company.show', this.company_id), 'get', this.section, false, false)
|
||||
},
|
||||
successHandler(response){
|
||||
this.$store.dispatch('completeList', {'name': this.section, 'data': []});
|
||||
this.isLoading = false;
|
||||
this.company = response.payload.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
<template>
|
||||
<div class="row" v-if="company">
|
||||
<div class="col">
|
||||
<div class="row m-b-30" v-if="$store.getters.isAdmin">
|
||||
<div class="col bg-master-lightest b-rad-lg p-t-10 p-b-15">
|
||||
<customer-profile-component :data="company"></customer-profile-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
company_id: {
|
||||
type: Number,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
section: 'orderListSection',
|
||||
isLoading: true,
|
||||
company: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
pendingQueue () {
|
||||
return this.$store.getters.isInCompleteQueue(this.section);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
pendingQueue(inComplete){
|
||||
if(inComplete){
|
||||
this.fetchCompany();
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.$store.dispatch('updateListQueue', {'name': this.section});
|
||||
},
|
||||
methods: {
|
||||
fetchCompany(){
|
||||
this.isLoading = true;
|
||||
this.submit(route('api.company.show', this.company_id), 'get', this.section, false, false)
|
||||
},
|
||||
successHandler(response){
|
||||
this.$store.dispatch('completeList', {'name': this.section, 'data': []});
|
||||
this.isLoading = false;
|
||||
this.company = response.payload.data;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,112 +0,0 @@
|
||||
<template>
|
||||
<div class="row tabsContainer" v-show="!$store.getters.isShowing('createContainerFormSection') && !$store.getters.isShowing('searchContainerSection')">
|
||||
<div class="col no-padding">
|
||||
<div class="row m-l-0 m-r-0">
|
||||
<div class="col col-md-4 m-r-5">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton active" tab-name="active">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<img src="https://img.icons8.com/dotty/35/000000/cargo-ship.png"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Active</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-inline m-l-5">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton" tab-name="arrived">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
||||
width="35" height="35"
|
||||
viewBox="0 0 172 172"
|
||||
style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#000000"><path d="M86.06719,12.9c-0.25976,-0.00731 -0.5187,0.03252 -0.76426,0.11758l-68.8,23.65c-0.86858,0.29776 -1.45225,1.11422 -1.45293,2.03242v12.9c-0.00043,0.68443 0.325,1.32819 0.8764,1.73365c0.5514,0.40547 1.2629,0.5242 1.91608,0.31977l1.50752,-0.47031v99.46689h19.35h10.75h36.55h2.15h34.4h12.9h17.2v-99.46689l1.50752,0.47031c0.65319,0.20444 1.36468,0.0857 1.91608,-0.31977c0.5514,-0.40547 0.87683,-1.04922 0.8764,-1.73365v-12.9c-0.00068,-0.9182 -0.58435,-1.73466 -1.45293,-2.03242l-68.8,-23.65c-0.20291,-0.07043 -0.41523,-0.11007 -0.62988,-0.11758zM86,17.32178l66.65,22.91094v8.44043l-7.95752,-2.48174c-0.27786,-0.09509 -0.57226,-0.13224 -0.86504,-0.10918l-0.21416,-0.22676l-0.74326,-0.13437l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.67607,0.11758c0.18673,0.12653 0.3922,0.22289 0.60889,0.28555l4.94248,1.54531v96.51064h-10.75v-86h-103.2v86h-10.75v-96.51484l4.94248,-1.54531c0.75045,-0.21514 1.32533,-0.82012 1.50193,-1.58056c0.1766,-0.76044 -0.07284,-1.55685 -0.65168,-2.08069c-0.57883,-0.52383 -1.39612,-0.69278 -2.13521,-0.44139l-7.95752,2.48594v-8.44043zM85.40791,28.13477l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.40674zM93.61738,30.33096l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM77.20264,30.70049l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31856,-1.40674zM101.82686,32.89668l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM68.99316,33.26621l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM110.03633,35.4624l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM60.78369,35.83193l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.41094zM118.2416,38.02812l-1.72168,0.86084l-0.34014,1.89805l1.31856,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.41094zM52.57422,38.39766l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM126.45107,40.59385l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM44.36895,40.95918l-1.72588,0.86504l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31855,-1.40674zM134.66055,43.15537l-1.72168,0.86504l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31436,-1.40674zM36.15947,43.5249l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31856,-1.40674zM38.7,66.65h94.6v81.7h-10.75v-34.4h-17.2v-34.4h-38.7v2.15v32.25h-17.2v2.15v32.25h-10.75zM70.95,83.85h30.1v30.1h-12.9h-2.15h-15.05zM53.75,118.25h12.9h17.2v30.1h-30.1zM88.15,118.25h17.2h12.9v30.1h-30.1z"></path></g></g></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Un-stuffed</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 ml-auto d-none d-md-inline">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton" tab-name="complete">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<img src="https://img.icons8.com/dotty/35/000000/shipped.png"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Delivered</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-margin">
|
||||
<div class="col bg-master-lightest p-1 p-sm-4">
|
||||
<div class="row tabsContainer tabContent" tab-name="active">
|
||||
<div class="col">
|
||||
<list-component section="activeContainerListSection" :endpoint="route('api.packing_list.container.list')" :options="{'per_page': 5, 'status_in': [1], 'owner_id': data, order_by: {column: 'loading_date', DESC: true}}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<container-component :data="data"></container-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="arrived">
|
||||
<div class="col">
|
||||
<list-component section="arrivedContainerListSection" :endpoint="route('api.packing_list.container.list')" :options="{'per_page': 5, 'status_in': [3], 'owner_id': data, 'has_pending_delivery': true, order_by: {column: 'loading_date', DESC: true}}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<container-component :data="data"></container-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="complete">
|
||||
<div class="col">
|
||||
<list-component section="completeContainerListSection" :endpoint="route('api.packing_list.container.list')" :options="{'per_page': 5, 'status_in': [3], 'owner_id': data, 'has_pending_delivery': false, order_by: {column: 'loading_date', DESC: true}}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<container-component :data="data"></container-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
export default {
|
||||
props: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
@@ -51,9 +51,6 @@
|
||||
<p class="no-margin bold" :class="{'text-success': item.status === 3, 'text-complete': item.status !== 3}">{{item.status === 3 ? 'Un-stuffed' : 'In Progress'}}</p>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<a class="btn btn-default no-border" :href="route('container.packaging_list.export', item.id)">
|
||||
<i class="fa fa-file-pdf-o"></i>
|
||||
</a>
|
||||
<div class="btn btn-default no-border" @click="expanded = !expanded">
|
||||
<i class="fa" :class="{'fa-angle-down': !expanded, 'fa-angle-up': expanded}" ></i>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="row m-b-15" @keyup.enter="updateFilters()">
|
||||
<div class="row m-b-15">
|
||||
<div class="col no-margin">
|
||||
<div class="row m-b-15">
|
||||
<div class="col col-sm-12 col-md-4">
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
<div class="col-2">
|
||||
<div v-if="item.order">
|
||||
<a :href="route('customer.profile', item.order.company_module.marking)">{{item.order.company_module.marking}}</a>/<a :href="route('order.show', item.order.reference)">{{item.order.reference}}</a>
|
||||
<p v-if="item.receive_packing_list">{{item.receive_packing_list.transport.drop_date}}</p>
|
||||
</div>
|
||||
<div v-if="!item.order" class="text-danger">Unclaimed Packing List</div>
|
||||
</div>
|
||||
@@ -26,45 +25,17 @@
|
||||
<p class="no-margin">{{item.transport ? item.transport.current_schedule.eta : 'n/a'}}</p>
|
||||
</div>
|
||||
<div class="col-auto text-right" v-if="!item.transport">
|
||||
<div class="row m-b-5">
|
||||
<div class="col">
|
||||
<div v-if="item.order">
|
||||
<div class="btn btn-xs btn-success pointer" v-if="item.status === 5" @click="updateStatus(item.status === 1 ? 1 : 2)"><i class="fa fa-check m-r-5"></i>Release</div>
|
||||
<div class="btn btn-xs btn-danger pointer" v-if="item.status !== 5" @click="updateStatus(5)"><i class="fa fa-hand-paper-o m-r-5"></i>Hold</div>
|
||||
</div>
|
||||
<div v-if="!item.order" class="text-danger">Unclaimed</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div v-if="!item.shippng_transaction">
|
||||
<div class="btn btn-xs btn-primary pointer" @click="generateInvoice()">Generate Invoice</div>
|
||||
</div>
|
||||
<div v-if="item.shippng_transaction">
|
||||
<div v-for="files in item.shippng_transaction.documents.files" v-bind:key="files.id" class="col-auto no-padding">
|
||||
<document-file-viewer-component :file="files">
|
||||
<template slot="button">
|
||||
<div class="btn btn-xs btn-primary pointer d-block m-b-5">View Invoice</div>
|
||||
</template>
|
||||
</document-file-viewer-component>
|
||||
</div>
|
||||
<!-- <div class="btn btn-xs btn-primary pointer d-block">Pay Invoice</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.order">
|
||||
<div class="btn btn-xs btn-success pointer" v-if="item.status === 5" @click="updateStatus(item.status === 1 ? 1 : 2)"><i class="fa fa-check m-r-5"></i>Release</div>
|
||||
<div class="btn btn-xs btn-danger pointer" v-if="item.status !== 5" @click="updateStatus(5)"><i class="fa fa-hand-paper-o m-r-5"></i>Hold</div>
|
||||
</div>
|
||||
<div v-if="!item.order" class="text-danger">Unclaimed</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
parameters: {
|
||||
packing_list_id: null,
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
cbm () {
|
||||
return (Math.ceil((this.item.packages.reduce((total, obj) => (obj.type === 2 ? 0 : obj.cbm) + total, 0)) * 1000) / 1000).toFixed(3)
|
||||
@@ -73,13 +44,7 @@
|
||||
return (Math.ceil((this.item.packages.reduce((total, obj) => (obj.type === 2 ? obj.cbm : 0) + total, 0)) * 1000) / 1000).toFixed(3)
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.parameters.packing_list_id = this.data.id;
|
||||
},
|
||||
methods: {
|
||||
generateInvoice() {
|
||||
this.submit(this.route('api.transaction.supplier.create'), 'post', '', true, true);
|
||||
},
|
||||
updateStatus(status){
|
||||
this.submit(this.route('api.packing_list.status.update', this.item.id, status), 'put', '', true, true)
|
||||
},
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<template>
|
||||
<div class="row parentContainer p-t-10 p-b-10">
|
||||
<div class="col-2">
|
||||
<div v-if="item.order">
|
||||
<a :href="route('customer.profile', item.order.company_module.marking)">{{item.order.company_module.marking}}</a>/<a :href="route('order.show', item.order.reference)">{{item.order.reference}}</a>
|
||||
</div>
|
||||
<div v-if="!item.order" class="text-danger">Unclaimed Packing List</div>
|
||||
</div>
|
||||
<div class="col text-center">{{item.packages.reduce((total, obj) => (obj.type === 2 ? 0 : obj.quantity) + total, 0)}}</div>
|
||||
<div class="col">{{ cbm }}</div>
|
||||
<div class="col">{{ overweight }}</div>
|
||||
<div class="col">{{ (parseFloat(cbm) + parseFloat(overweight)).toFixed(3)}}</div>
|
||||
<div class="col bold" :class="{'text-danger': item.status === 5, 'text-success': item.status !== 5}">{{item.transport ? 'Delivery' : item.status === 5 ? 'On Hold' : 'Release'}}</div>
|
||||
<div class="col">
|
||||
<p class="no-margin">{{item.transport ? (item.transport.current_schedule ? item.transport.current_schedule.eta : 'n/a') : 'n/a'}}</p>
|
||||
</div>
|
||||
<div class="col text-right" v-if="!item.transport">
|
||||
<div v-if="item.order">
|
||||
<div class="btn btn-xs btn-success pointer" v-if="item.status === 5" @click="updateStatus(item.status === 1 ? 1 : 2)"><i class="fa fa-check m-r-5"></i>Release</div>
|
||||
<div class="btn btn-xs btn-danger pointer" v-if="item.status !== 5" @click="updateStatus(5)"><i class="fa fa-hand-paper-o m-r-5"></i>Hold</div>
|
||||
</div>
|
||||
<div v-if="!item.order" class="text-danger">Unclaimed</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
export default {
|
||||
computed: {
|
||||
cbm () {
|
||||
return (Math.ceil((this.item.packages.reduce((total, obj) => (obj.type === 2 ? 0 : obj.cbm) + total, 0)) * 1000) / 1000).toFixed(3)
|
||||
},
|
||||
overweight(){
|
||||
return (Math.ceil((this.item.packages.reduce((total, obj) => (obj.type === 2 ? obj.cbm : 0) + total, 0)) * 1000) / 1000).toFixed(3)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateStatus(status){
|
||||
this.submit(this.route('api.packing_list.status.update', this.item.id, status), 'put', '', true, true)
|
||||
},
|
||||
successHandler(response){
|
||||
this.item = response.payload.data;
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
@@ -1,74 +0,0 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<loading-component style="height: 50px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
|
||||
<div class="row" v-show="!$store.getters.isLoading(section)">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<h6 class="all-caps m-b-5 bold no-margin">{{ data.remarks.length > 0 ? 'Edit' : 'Create' }} Remark</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-5 animate__animated animate__fadeInUpBig animate__fast" v-if="error">
|
||||
<div class="col">
|
||||
<small class="bold fs-10 text-danger">{{error}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<validation-wrapper-component :validator="$v.parameters.content">
|
||||
<label>Remark</label>
|
||||
<input type="text" class="form-control" v-model="parameters.content">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col p-r-5">
|
||||
<div class="btn btn-sm btn-default bg-master-lightest btn-block b-rad-none" data-dismiss="modal">Cancel</div>
|
||||
</div>
|
||||
<div class="col p-l-5">
|
||||
<div class="btn btn-sm btn-primary btn-block b-rad-none" @click="submitForm()">{{ data.remarks.length > 0 ? 'Edit' : 'Create' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
export default {
|
||||
props: {
|
||||
data:{
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
module_type: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
parameters: {
|
||||
content: this.data.remarks.length > 0 ? this.data.remarks[0].content : '',
|
||||
model_type: this.module_type
|
||||
}
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
content: {
|
||||
required: false
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
this.submit(this.data.remarks.length > 0 ? this.route('api.remark.update', this.data.remarks[0].id) : this.route('api.remark.create', this.data.id), this.data.remarks.length > 0 ? 'put' : 'post', this.section, true, true);
|
||||
}
|
||||
},
|
||||
mixins: [ModalFormHandler]
|
||||
|
||||
}
|
||||
</script>
|
||||
@@ -62,15 +62,15 @@
|
||||
<div class="row text-center">
|
||||
<div class="col b-r b-grey text-info p-t-5 p-b-10">
|
||||
<small class="fs-10 all-caps bold">Received</small>
|
||||
<h6 class="bold no-margin text-info">{{item.parcels.received_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.quantity + total, 0)}}</h6>
|
||||
<h6 class="bold no-margin text-info">{{ receivedPackages }}</h6>
|
||||
</div>
|
||||
<div class="col b-r b-grey text-primary p-t-5 p-b-10">
|
||||
<small class="fs-10 all-caps bold">In Transit</small>
|
||||
<h6 class="bold no-margin text-primary">{{item.parcels.in_transit_packages.flatMap(packing_list => packing_list.packages).concat(item.parcels.destination_warehouse_packages.flatMap(packing_list => packing_list.packages)).reduce((total, obj) => obj.quantity + total, 0)}}</h6>
|
||||
<h6 class="bold no-margin text-primary">{{ inTransitPackages }}</h6>
|
||||
</div>
|
||||
<div class="col text-success p-t-5 p-b-10">
|
||||
<small class="fs-10 all-caps bold">Delivered</small>
|
||||
<h6 class="bold no-margin text-success">{{item.parcels.delivered_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.quantity + total, 0)}}</h6>
|
||||
<h6 class="bold no-margin text-success">{{ deliveredPackages }}</h6>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,6 +121,8 @@
|
||||
<div class="col bg-master-lightest b-a b-grey">
|
||||
<div class="row p-t-15 p-b-15 b-b b-grey pointer requestModal" v-if="item.status !== 5" data-type="cancelOrder">
|
||||
<div class="col">
|
||||
<h6>receivedPackages: {{receivedPackages}}</h6>
|
||||
<h6>deliveredPackages: {{deliveredPackages}}</h6>
|
||||
<h6 class="light no-margin fs-13 text-danger"><i class="fa fa-times m-r-10"></i>Cancel Order</h6>
|
||||
</div>
|
||||
</div>
|
||||
@@ -129,6 +131,11 @@
|
||||
<h6 class="light no-margin fs-13 text-success"><i class="fa fa-history m-r-10"></i>Restore Order</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row p-t-15 p-b-15 b-b b-grey pointer requestModal" v-if="receivedPackages > 0 && (receivedPackages === deliveredPackages)" data-type="completeOrder">
|
||||
<div class="col">
|
||||
<h6 class="light no-margin fs-13 text-success"><i class="fa fa-check-circle m-r-10"></i>Complete Order</h6>
|
||||
</div>
|
||||
</div>
|
||||
<a :href="route('order.qr.download', item.id)" target="_blank">
|
||||
<div class="row p-t-15 p-b-15 b-b b-grey pointer">
|
||||
<div class="col">
|
||||
@@ -160,6 +167,17 @@
|
||||
expanded: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
receivedPackages () {
|
||||
return this.item.parcels.received_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.quantity + total, 0)
|
||||
},
|
||||
inTransitPackages () {
|
||||
return this.item.parcels.in_transit_packages.flatMap(packing_list => packing_list.packages).concat(this.item.parcels.destination_warehouse_packages.flatMap(packing_list => packing_list.packages)).reduce((total, obj) => obj.quantity + total, 0)
|
||||
},
|
||||
deliveredPackages () {
|
||||
return this.item.parcels.delivered_packages.flatMap(packing_list => packing_list.packages).reduce((total, obj) => obj.quantity + total, 0)
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
@@ -144,6 +144,15 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row p-t-10 p-b-10">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col text-center">
|
||||
<button class="btn btn-block btn-success b-rad-none all-caps">Complete Order</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-25" v-if="item.container">
|
||||
|
||||
+2
-2
@@ -5,9 +5,9 @@
|
||||
<div class="row justify-content-center" v-show="!isLoading">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col text-center">
|
||||
<div class="col">
|
||||
<h3 class="all-caps">Are you Sure?</h3>
|
||||
<div class="fs-11">Are you sure you want to delete this remark?</div>
|
||||
<div class="fs-11">Are you sure you want to delete this comment?</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col-6 p-r-0">
|
||||
<validation-wrapper-component :validator="$v.parameters.content">
|
||||
<input type="text" class="form-control fs-12" placeholder="Make a remark on this order." v-model.trim="parameters.content">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
<div class="col-auto bg-success d-flex justify-content-center align-items-center pointer text-white">
|
||||
<i class="fa fa-check" @click="submitForm"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import modalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||
import { required } from "vuelidate/lib/validators";
|
||||
|
||||
export default {
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
parameters: {
|
||||
content: this.content,
|
||||
},
|
||||
};
|
||||
},
|
||||
validations: {
|
||||
parameters: {
|
||||
content: { required },
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.data) {
|
||||
this.parameters.content = this.data.content
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
this.submit(this.data ? this.route('api.remark.update', this.data.id) : this.route('api.order.remark.create', this.id), this.data ? 'put' : 'post', this.section, true, true);
|
||||
this.$emit('submit')
|
||||
}
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
}
|
||||
</script>
|
||||
@@ -35,25 +35,39 @@
|
||||
<div class="row">
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
<h6 class="no-margin"><b>Remark:</b></h6>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" type="orderRemark">
|
||||
<remark-form-component module_type="Order" :data="order" :section="section"></remark-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
<div class="col-auto p-l-0" v-if="order.remarks.length == 0">
|
||||
<div class="btn btn-xs btn-outline-info b-rad-none pointer requestModal" data-type="orderRemark">Add a Remark</div>
|
||||
<div class="col-auto p-l-0" v-if="!addComment && order.remarks.length == 0">
|
||||
<div class="btn btn-xs btn-outline-info b-rad-none pointer" @click="addComment = !addComment">Add a Remark</div>
|
||||
</div>
|
||||
<div class="col d-flex align-items-center pl-3 pl-md-0" v-if="order.remarks.length >= 1">
|
||||
<h6 class="no-margin">{{ order.remarks[0].content }}</h6>
|
||||
<span class="btn btn-md btn-default m-l-10 requestModal" data-type="orderRemark">
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
<div class="col d-flex align-items-center pl-3 pl-md-0" v-if="order.remarks.length >= 1 && !isEditRemark">
|
||||
<h6 class="no-margin">{{order.remarks[0].content}}</h6>
|
||||
<span class="btn btn-md btn-default m-l-10" @click="isEditRemark = !isEditRemark">
|
||||
<i class="fa fa-edit"></i>
|
||||
</span>
|
||||
<span class="btn btn-md btn-default m-l-5 requestModal" data-type="deleteOrderRemark">
|
||||
<i class="fa fa-trash"></i>
|
||||
</span>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" type="deleteOrderRemark">
|
||||
<delete-remark-form-component :section="section" :data="order.remarks[0]"></delete-remark-form-component>
|
||||
<i class="fa fa-trash"></i>
|
||||
</span>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteOrderRemark">
|
||||
<delete-order-remark-form-component :section="section" :data="order.remarks[0]" v-on:submit="addComment=false"></delete-order-remark-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
<div class="col pl-2 pl-md-0" v-if="isEditRemark">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<order-remark-form-component :section="section" :data="order.remarks[0]" :id="order.id" v-on:submit="isEditRemark=false"></order-remark-form-component>
|
||||
</div>
|
||||
<div class="col-auto d-flex align-items-center">
|
||||
<div class="row m-l-5">
|
||||
<div class="col b-a btn btn-sm btn-default" @click="isEditRemark = !isEditRemark">
|
||||
Cancel
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col p-l-0" v-if="order.remarks.length === 0 && addComment">
|
||||
<order-remark-form-component :section="section" :id="order.id"></order-remark-form-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -451,6 +465,7 @@
|
||||
section: 'orderProfileSection',
|
||||
isLoading: true,
|
||||
order: null,
|
||||
isEditRemark: false,
|
||||
addComment: false,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="row mt-3 mt-md-0">
|
||||
<div class="col">
|
||||
<div class="input-group form-group no-margin form-group-default">
|
||||
<input class="form-control p-t-10" placeholder="Search Order No." v-model="query">
|
||||
<input class="form-control p-t-10" placeholder="Search Order No.">
|
||||
<button type="button" class="btn btn-primary" @click="search">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
@@ -17,9 +17,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-md-auto text-right">
|
||||
<a :href="route('orders.refresh')"><div class="btn btn-sm btn-warning all-caps b-rad-none pointer"><i class="fa fa-refresh m-r-10"></i>Refresh Orders</div></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<list-component section="searchOrderListSection" :endpoint="route('api.order.list')" :options="{reference_like:query, with_packing_lists: true}" :columns=3 v-if="$store.getters.isShowing('searchOrderSection')">
|
||||
<list-component section="searchOrderListSection" :endpoint="route('api.order.list')" :options="{reference_like:query, with_packing_lists: true}" :columns=3 v-show="$store.getters.isShowing('searchOrderSection')">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<order-component :data="data"></order-component>
|
||||
</template>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="35" height="35" viewBox="0 0 172 172" style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#333333"><path d="M15.05,25.8v105.35h4.3v2.15c0,3.53669 2.91331,6.45 6.45,6.45h50.5376c1.67444,3.75213 5.30105,6.45 9.6624,6.45c4.36203,0 7.98734,-2.69797 9.6624,-6.45h50.5376c3.53669,0 6.45,-2.91331 6.45,-6.45v-2.15h4.3v-105.35h-64.5c-2.60352,0 -4.86855,1.23893 -6.45,3.08643c-1.58145,-1.8475 -3.84648,-3.08643 -6.45,-3.08643zM19.35,30.1h60.2c2.40083,0 4.3,1.89917 4.3,4.3c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-2.40083 1.89917,-4.3 4.3,-4.3h60.2v96.75h-60.2c-2.60352,0 -4.86855,1.23893 -6.45,3.08643c-1.58145,-1.8475 -3.84648,-3.08643 -6.45,-3.08643h-60.2zM86,40.85c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,49.45c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM119.68193,53.57363v4.12783c-8.0754,0.7482 -12.97979,5.32437 -12.97979,12.23232c0,5.8351 3.64818,9.8429 10.31748,11.54785l2.66231,0.68867v13.63906c-4.45695,-0.50955 -7.33113,-2.99253 -7.62998,-6.55078h-6.33662c0.0301,6.9402 5.41175,11.63533 13.9666,12.20293v3.88428h4.09844v-3.91367c8.7634,-0.7482 13.81963,-5.32289 13.81963,-12.65224c0,-6.192 -3.53195,-9.99125 -11.03975,-11.8166l-2.77988,-0.62568v-12.8958c3.9474,0.47945 6.64034,3.04917 6.76074,6.34082h6.24844c-0.1806,-6.67145 -5.26273,-11.39315 -13.00918,-12.08115v-4.12783zM86,58.05c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM119.68193,63.4124v12.05596c-4.3086,-0.8686 -6.58018,-2.99112 -6.58018,-6.07207c0,-3.26155 2.75103,-5.77534 6.58018,-5.98389zM86,66.65c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,75.25c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM123.78037,82.94717c5.08475,1.01695 7.44521,3.07924 7.44521,6.52139c0,3.79905 -2.71951,6.12871 -7.44521,6.39961zM86,83.85c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,92.45c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,101.05c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,109.65c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,118.25c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM23.65,131.15h55.9c2.40083,0 4.3,1.89917 4.3,4.3h4.3c0,-2.40083 1.89917,-4.3 4.3,-4.3h55.9v2.15c0,1.21481 -0.93519,2.15 -2.15,2.15h-53.56523l-0.41992,1.6083c-0.72235,2.78276 -3.19533,4.8417 -6.21484,4.8417c-3.01952,0 -5.49455,-2.05645 -6.21484,-4.8375l-0.41992,-1.6125h-53.56523c-1.21481,0 -2.15,-0.93519 -2.15,-2.15z"></path></g></g></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto p-r-10">
|
||||
<div class="font-heading all-caps fs-8 muted">Warehouse Name</div>
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto p-r-10">
|
||||
<div class="font-heading all-caps fs-8 muted">Extra Charges</div>
|
||||
@@ -27,43 +27,17 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="font-heading all-caps">MYR 0.00 <i class="fa fa-edit pointer fa-fw m-l-5 requestModal text-primary" data-type="editWarehouseCharges"></i></div>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="editWarehouseCharges">
|
||||
<edit-warehouse-charges-form-component :data="data"></edit-warehouse-charges-form-component>
|
||||
</modal-component>
|
||||
<div class="font-heading all-caps">MYR 0.00</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-auto p-r-10">
|
||||
<div class="font-heading all-caps fs-8 muted">Remarks</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col" v-if="data.remarks.length > 0">
|
||||
<div class="font-heading">
|
||||
{{ data.remarks[0].content }}
|
||||
<i class="fa fa-edit pointer fa-fw m-l-5 text-primary requestModal " data-type="warehouseRemark"></i>
|
||||
<i class="fa fa-trash pointer fa-fw m-l-5 text-primary requestModal" data-type="deleteWarehouseRemark"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="data.remarks.length == 0" class="col muted hover-primary pointer fs-10 requestModal" data-type="warehouseRemark">
|
||||
<i class="fa fa-plus"></i> Add
|
||||
</div>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" type="warehouseRemark">
|
||||
<remark-form-component module_type="CompanyModule" :data="data" section="warhouseListSection"></remark-form-component>
|
||||
</modal-component>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" type="deleteWarehouseRemark">
|
||||
<delete-remark-form-component :section="section" :data="data.remarks[0]"></delete-remark-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!-- <div class="btn btn-xs btn-primary pointer m-t-10 requestModal" data-type="editWarehouseCharges">View Details</div> -->
|
||||
<a :href="route('warehouse.show', data.id)" class="btn btn-xs btn-primary pointer m-t-10">View Details</a>
|
||||
<div class="btn btn-xs btn-primary pointer m-t-10 requestModal" data-type="editWarehouseCharges">Edit</div>
|
||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="editWarehouseCharges">
|
||||
<edit-warehouse-charges-form-component :data="data"></edit-warehouse-charges-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,7 +56,7 @@
|
||||
required: false
|
||||
},
|
||||
section: {
|
||||
default: 'warhouseListSection'
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
mixins: [modalFormHandler]
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
<customer-profile-details-section-component :company_id={{$id}}></customer-profile-details-section-component>
|
||||
@endsection
|
||||
@@ -1,135 +0,0 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
|
||||
<div class="row tabsContainer">
|
||||
<div class="col no-padding">
|
||||
<div class="row m-l-0 m-r-0">
|
||||
<div class="col">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton active" tab-name="pendingArrangement">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<img src="https://img.icons8.com/dotty/35/000000/cargo-ship.png"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Pending Arrangement</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-inline m-l-5">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton" tab-name="pendingDelivery">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
||||
width="35" height="35"
|
||||
viewBox="0 0 172 172"
|
||||
style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#000000"><path d="M86.06719,12.9c-0.25976,-0.00731 -0.5187,0.03252 -0.76426,0.11758l-68.8,23.65c-0.86858,0.29776 -1.45225,1.11422 -1.45293,2.03242v12.9c-0.00043,0.68443 0.325,1.32819 0.8764,1.73365c0.5514,0.40547 1.2629,0.5242 1.91608,0.31977l1.50752,-0.47031v99.46689h19.35h10.75h36.55h2.15h34.4h12.9h17.2v-99.46689l1.50752,0.47031c0.65319,0.20444 1.36468,0.0857 1.91608,-0.31977c0.5514,-0.40547 0.87683,-1.04922 0.8764,-1.73365v-12.9c-0.00068,-0.9182 -0.58435,-1.73466 -1.45293,-2.03242l-68.8,-23.65c-0.20291,-0.07043 -0.41523,-0.11007 -0.62988,-0.11758zM86,17.32178l66.65,22.91094v8.44043l-7.95752,-2.48174c-0.27786,-0.09509 -0.57226,-0.13224 -0.86504,-0.10918l-0.21416,-0.22676l-0.74326,-0.13437l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.67607,0.11758c0.18673,0.12653 0.3922,0.22289 0.60889,0.28555l4.94248,1.54531v96.51064h-10.75v-86h-103.2v86h-10.75v-96.51484l4.94248,-1.54531c0.75045,-0.21514 1.32533,-0.82012 1.50193,-1.58056c0.1766,-0.76044 -0.07284,-1.55685 -0.65168,-2.08069c-0.57883,-0.52383 -1.39612,-0.69278 -2.13521,-0.44139l-7.95752,2.48594v-8.44043zM85.40791,28.13477l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.40674zM93.61738,30.33096l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM77.20264,30.70049l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31856,-1.40674zM101.82686,32.89668l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM68.99316,33.26621l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM110.03633,35.4624l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM60.78369,35.83193l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.41094zM118.2416,38.02812l-1.72168,0.86084l-0.34014,1.89805l1.31856,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.41094zM52.57422,38.39766l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM126.45107,40.59385l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM44.36895,40.95918l-1.72588,0.86504l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31855,-1.40674zM134.66055,43.15537l-1.72168,0.86504l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31436,-1.40674zM36.15947,43.5249l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31856,-1.40674zM38.7,66.65h94.6v81.7h-10.75v-34.4h-17.2v-34.4h-38.7v2.15v32.25h-17.2v2.15v32.25h-10.75zM70.95,83.85h30.1v30.1h-12.9h-2.15h-15.05zM53.75,118.25h12.9h17.2v30.1h-30.1zM88.15,118.25h17.2h12.9v30.1h-30.1z"></path></g></g></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Pending Delivery</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col d-none d-md-inline m-l-5">
|
||||
<div class="row justify-content-end">
|
||||
<div class="col">
|
||||
<div class="row fs-12 text-center">
|
||||
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton" tab-name="delivered">
|
||||
<div class="row justify-content-center m-b-5">
|
||||
<div class="col-auto">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
|
||||
width="35" height="35"
|
||||
viewBox="0 0 172 172"
|
||||
style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#000000"><path d="M86.06719,12.9c-0.25976,-0.00731 -0.5187,0.03252 -0.76426,0.11758l-68.8,23.65c-0.86858,0.29776 -1.45225,1.11422 -1.45293,2.03242v12.9c-0.00043,0.68443 0.325,1.32819 0.8764,1.73365c0.5514,0.40547 1.2629,0.5242 1.91608,0.31977l1.50752,-0.47031v99.46689h19.35h10.75h36.55h2.15h34.4h12.9h17.2v-99.46689l1.50752,0.47031c0.65319,0.20444 1.36468,0.0857 1.91608,-0.31977c0.5514,-0.40547 0.87683,-1.04922 0.8764,-1.73365v-12.9c-0.00068,-0.9182 -0.58435,-1.73466 -1.45293,-2.03242l-68.8,-23.65c-0.20291,-0.07043 -0.41523,-0.11007 -0.62988,-0.11758zM86,17.32178l66.65,22.91094v8.44043l-7.95752,-2.48174c-0.27786,-0.09509 -0.57226,-0.13224 -0.86504,-0.10918l-0.21416,-0.22676l-0.74326,-0.13437l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.67607,0.11758c0.18673,0.12653 0.3922,0.22289 0.60889,0.28555l4.94248,1.54531v96.51064h-10.75v-86h-103.2v86h-10.75v-96.51484l4.94248,-1.54531c0.75045,-0.21514 1.32533,-0.82012 1.50193,-1.58056c0.1766,-0.76044 -0.07284,-1.55685 -0.65168,-2.08069c-0.57883,-0.52383 -1.39612,-0.69278 -2.13521,-0.44139l-7.95752,2.48594v-8.44043zM85.40791,28.13477l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.40674zM93.61738,30.33096l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM77.20264,30.70049l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31856,-1.40674zM101.82686,32.89668l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.40674zM68.99316,33.26621l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM110.03633,35.4624l-1.72588,0.86084l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13437l1.72168,-0.86504l0.34014,-1.89385l-1.31855,-1.40674zM60.78369,35.83193l-1.72168,0.86084l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13438l1.72168,-0.86504l0.34014,-1.89385l-1.31436,-1.41094zM118.2416,38.02812l-1.72168,0.86084l-0.34014,1.89805l1.31856,1.40674l0.74326,0.13437l1.72588,-0.86504l0.33594,-1.89385l-1.31436,-1.41094zM52.57422,38.39766l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM126.45107,40.59385l-1.72168,0.86084l-0.34014,1.89805l1.31855,1.40674l0.74326,0.13438l1.72168,-0.86504l0.34014,-1.89805l-1.31436,-1.40674zM44.36895,40.95918l-1.72588,0.86504l-0.33594,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31855,-1.40674zM134.66055,43.15537l-1.72168,0.86504l-0.34014,1.89805l1.31436,1.40674l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31436,-1.40674zM36.15947,43.5249l-1.72168,0.86504l-0.34014,1.89385l1.31436,1.41094l0.74746,0.13018l1.72168,-0.86084l0.34014,-1.89805l-1.31856,-1.40674zM38.7,66.65h94.6v81.7h-10.75v-34.4h-17.2v-34.4h-38.7v2.15v32.25h-17.2v2.15v32.25h-10.75zM70.95,83.85h30.1v30.1h-12.9h-2.15h-15.05zM53.75,118.25h12.9h17.2v30.1h-30.1zM88.15,118.25h17.2h12.9v30.1h-30.1z"></path></g></g></svg>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps">Delivered</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-margin">
|
||||
<div class="col bg-master-lightest p-1 p-sm-4">
|
||||
<div class="row tabsContainer tabContent" tab-name="pendingArrangement">
|
||||
<div class="col">
|
||||
<div class="row align-items-center m-b-5 p-b-10 b-b b-grey muted all-caps fs-10">
|
||||
<div class="col-2">Marking</div>
|
||||
<div class="col text-center">Quantity</div>
|
||||
<div class="col">CBM</div>
|
||||
<div class="col">Overweight CBM</div>
|
||||
<div class="col">Total CBM</div>
|
||||
<div class="col">status</div>
|
||||
<div class="col">Delivery Date</div>
|
||||
<div class="col text-right">Action</div>
|
||||
</div>
|
||||
<list-component section="activeContainerListSection" :endpoint="route('api.packing_list.list')" :options="{'packing_list_delivery_status': 1, 'per_page': 30}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<warehouse-packing-list-component :data="data"></warehouse-packing-list-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="pendingDelivery">
|
||||
<div class="col">
|
||||
<div class="row align-items-center m-b-5 p-b-10 b-b b-grey muted all-caps fs-10">
|
||||
<div class="col-2">Marking</div>
|
||||
<div class="col text-center">Quantity</div>
|
||||
<div class="col">CBM</div>
|
||||
<div class="col">Overweight CBM</div>
|
||||
<div class="col">Total CBM</div>
|
||||
<div class="col">status</div>
|
||||
<div class="col">Delivery Date</div>
|
||||
</div>
|
||||
<list-component section="arrivedContainerListSection" :endpoint="route('api.packing_list.list')" :options="{'packing_list_delivery_status': 2 , 'per_page': 30}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<warehouse-packing-list-component :data="data"></warehouse-packing-list-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer tabContent hide" tab-name="delivered">
|
||||
<div class="col">
|
||||
<div class="row align-items-center m-b-5 p-b-10 b-b b-grey muted all-caps fs-10">
|
||||
<div class="col-2">Marking</div>
|
||||
<div class="col text-center">Quantity</div>
|
||||
<div class="col">CBM</div>
|
||||
<div class="col">Overweight CBM</div>
|
||||
<div class="col">Total CBM</div>
|
||||
<div class="col">status</div>
|
||||
<div class="col">Delivery Date</div>
|
||||
</div>
|
||||
<list-component section="completeContainerListSection" :endpoint="route('api.packing_list.list')" :options="{'packing_list_delivery_status': 3, 'per_page': 30}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<warehouse-packing-list-component :data="data"></warehouse-packing-list-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -7,6 +7,5 @@
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
{{--<order-search-section-component v-show="!$store.getters.isShowing('createOrderForm')"></order-search-section-component>--}}
|
||||
<order-search-section-component v-show="!$store.getters.isShowing('createOrderForm')" v-if="$store.getters.isAdmin"></order-search-section-component>
|
||||
<order-section-component></order-section-component>
|
||||
@endsection
|
||||
@@ -1,144 +0,0 @@
|
||||
@extends('layouts.base_pdf')
|
||||
@section('inner_content')
|
||||
<br>
|
||||
<htmlpageheader name="page-header">
|
||||
<br><br>
|
||||
<div class="separator"><strong><i>{{ $invoice_transaction->bill_no }}</i></strong></div>
|
||||
</htmlpageheader>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="header-logo">
|
||||
<img src="{{ asset('images/ri_1.png') }}" alt="logo" id="logo" class="logo">
|
||||
</td>
|
||||
<td class="header-cief-address">
|
||||
<span class="company-name">
|
||||
<strong>
|
||||
CIEF WORLDWIDE SDN BHD
|
||||
</strong>
|
||||
</span>
|
||||
<span class="company-reg">(1134596-M)</span><br>
|
||||
Malaysian Global Innovation & Creativity Center <br>
|
||||
Level 1 CWS, Block 3730, Persiaran APEC, <br>
|
||||
63000 Cyberjaya, Malaysian. <br>
|
||||
Tel: 018-2909252
|
||||
</td>
|
||||
<td class="header-details">
|
||||
<div class="title">
|
||||
<strong>
|
||||
Invoice
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
<div class="number">EI#: {{ $invoice_transaction->bill_no }}</div>
|
||||
|
||||
@php
|
||||
$companyModule = $invoice_transaction->owner->owner->companyModule;
|
||||
@endphp
|
||||
|
||||
<div class="ref">Ref# {{ $invoice_transaction->owner->owner->reference }}</div>
|
||||
<!-- <div class="d-none">{{ $companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference }}</div> -->
|
||||
<div class="date">Date: {{ $invoice_transaction->created_at }}</div>
|
||||
<div> </div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="bill-to">
|
||||
<span class="sub-title">
|
||||
Bill To
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3" class="address">
|
||||
<div class="label">
|
||||
{{ $companyModule->name }}
|
||||
</div>
|
||||
<div class="address">
|
||||
@php
|
||||
$addresses = $invoice_transaction->owner->owner->addresses()->where('status', '=', 2)->first();
|
||||
@endphp
|
||||
{{ $addresses->street_one }}
|
||||
{{ $addresses->street_two }} ,
|
||||
{{ $addresses->district()->first()->name }},
|
||||
{{ $addresses->postcode }}
|
||||
{{ $addresses->state()->first()->name }},
|
||||
{{ $addresses->country()->first()->name }}
|
||||
</div>
|
||||
<div>
|
||||
@php
|
||||
$contact = $companyModule->contacts()->first();
|
||||
@endphp
|
||||
Phone: {{ $contact ? $contact->phone : '' }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
<table class="line-table" style="overflow: wrap" autosize="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="5%">No</th>
|
||||
<th class="description">Description</th>
|
||||
<th width="10%">Quantity</th>
|
||||
<th width="15%">Unit Price (RM)</th>
|
||||
<th width="10%">Total Amount<br>(RM)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($invoice_transaction->transactionDetails as $key => $transaction_detail)
|
||||
<tr>
|
||||
<td width="5%" class="center top">{{ $key + 1 }}</td>
|
||||
<td class="description">{{ $transaction_detail->name }}</td>
|
||||
<td width="10%" class="center top">{{ $transaction_detail->quantity }}</td>
|
||||
<td width="15%" class="center top">
|
||||
{{ $transaction_detail->price }}
|
||||
</td>
|
||||
<td width="20%" class="right top">
|
||||
{{ $transaction_detail->amount }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="subtotal">
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Subtotal</td>
|
||||
<td class="right middle">
|
||||
{{ number_format($invoice_transaction->amount, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="billingcharges">
|
||||
<td colspan="4"></td>
|
||||
<td class="right">Service Charges</td>
|
||||
<td class="right">
|
||||
{{ number_format($invoice_transaction->service_charge, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
@if($invoice_transaction->tax > 0)
|
||||
<tr class="billingcharges">
|
||||
<td colspan="4"></td>
|
||||
<td class="right">Tax</td>
|
||||
<td class="right">{{ number_format($invoice_transaction->tax, 2) }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
<td class="right middle">Total</td>
|
||||
<td class="total right middle">
|
||||
{{ number_format($invoice_transaction->amount, 2) }}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<htmlpagefooter name="page-footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td style="text-align: right; ">This is generated by computer. No signature required.</td>
|
||||
<td style="text-align: right; ">Page {PAGENO} of {nbpg}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</htmlpagefooter>
|
||||
@endsection
|
||||
@@ -152,13 +152,13 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col bg-master-light tabButton" tab-name="warehouses">
|
||||
<div class="col bg-master-light tabButton" tab-name="warehouseCharges">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-auto p-t-10 p-b-10 b-r b-grey">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="35" height="35" viewBox="0 0 172 172" style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#333333"><path d="M15.05,25.8v105.35h4.3v2.15c0,3.53669 2.91331,6.45 6.45,6.45h50.5376c1.67444,3.75213 5.30105,6.45 9.6624,6.45c4.36203,0 7.98734,-2.69797 9.6624,-6.45h50.5376c3.53669,0 6.45,-2.91331 6.45,-6.45v-2.15h4.3v-105.35h-64.5c-2.60352,0 -4.86855,1.23893 -6.45,3.08643c-1.58145,-1.8475 -3.84648,-3.08643 -6.45,-3.08643zM19.35,30.1h60.2c2.40083,0 4.3,1.89917 4.3,4.3c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-2.40083 1.89917,-4.3 4.3,-4.3h60.2v96.75h-60.2c-2.60352,0 -4.86855,1.23893 -6.45,3.08643c-1.58145,-1.8475 -3.84648,-3.08643 -6.45,-3.08643h-60.2zM86,40.85c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,49.45c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM119.68193,53.57363v4.12783c-8.0754,0.7482 -12.97979,5.32437 -12.97979,12.23232c0,5.8351 3.64818,9.8429 10.31748,11.54785l2.66231,0.68867v13.63906c-4.45695,-0.50955 -7.33113,-2.99253 -7.62998,-6.55078h-6.33662c0.0301,6.9402 5.41175,11.63533 13.9666,12.20293v3.88428h4.09844v-3.91367c8.7634,-0.7482 13.81963,-5.32289 13.81963,-12.65224c0,-6.192 -3.53195,-9.99125 -11.03975,-11.8166l-2.77988,-0.62568v-12.8958c3.9474,0.47945 6.64034,3.04917 6.76074,6.34082h6.24844c-0.1806,-6.67145 -5.26273,-11.39315 -13.00918,-12.08115v-4.12783zM86,58.05c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM119.68193,63.4124v12.05596c-4.3086,-0.8686 -6.58018,-2.99112 -6.58018,-6.07207c0,-3.26155 2.75103,-5.77534 6.58018,-5.98389zM86,66.65c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,75.25c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM123.78037,82.94717c5.08475,1.01695 7.44521,3.07924 7.44521,6.52139c0,3.79905 -2.71951,6.12871 -7.44521,6.39961zM86,83.85c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,92.45c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,101.05c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,109.65c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM86,118.25c-1.18741,0 -2.15,0.96259 -2.15,2.15c0,1.18741 0.96259,2.15 2.15,2.15c1.18741,0 2.15,-0.96259 2.15,-2.15c0,-1.18741 -0.96259,-2.15 -2.15,-2.15zM23.65,131.15h55.9c2.40083,0 4.3,1.89917 4.3,4.3h4.3c0,-2.40083 1.89917,-4.3 4.3,-4.3h55.9v2.15c0,1.21481 -0.93519,2.15 -2.15,2.15h-53.56523l-0.41992,1.6083c-0.72235,2.78276 -3.19533,4.8417 -6.21484,4.8417c-3.01952,0 -5.49455,-2.05645 -6.21484,-4.8375l-0.41992,-1.6125h-53.56523c-1.21481,0 -2.15,-0.93519 -2.15,-2.15z"></path></g></g></svg>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="fs-12 m-t-5 all-caps m-b-5">Warehouses</div>
|
||||
<div class="fs-12 m-t-5 all-caps m-b-5">Warehouse Charges</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -412,7 +412,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row tabsContainer hide tabContent" tab-name="warehouses">
|
||||
<div class="row tabsContainer hide tabContent" tab-name="warehouseCharges">
|
||||
<div class="col">
|
||||
<loading-component style="height: 200px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading('postcodes')"></loading-component>
|
||||
<div class="row" v-show="!$store.getters.isLoading('postcodes')">
|
||||
@@ -420,13 +420,13 @@
|
||||
<div class="row p-b-5 m-b-20 b-b b-grey align-items-center parentContainer">
|
||||
<div class="col">
|
||||
<div class="font-heading all-caps fs-10 hint-text">
|
||||
Warehouses
|
||||
Warehouse Charges
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<list-component key="2" section="warhouseListSection" :endpoint="route('api.company.module.list')" :options="{'type': 3}">
|
||||
<list-component key="2" section="warhouseListSection" :endpoint="route('api.company.list')" :options="{'has_business_module_type': 3}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<warehouse-charges-component :data="data"></warehouse-charges-component>
|
||||
</template>
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-3 ">
|
||||
<div class="row p-b-5 b-b b-grey m-b-10 m-l-0 m-r-0">
|
||||
<div class="col no-padding">
|
||||
<h6>Parcel in Warehouse</h6>
|
||||
</div>
|
||||
</div>
|
||||
<list-component section="warehouseListSection" :endpoint="route('api.packing_list.list')" :options="{packing_list_type: 1, per_page: 5, claimant_id : {{$id}}, order_by: {column: 'arrival_date', DESC: true}, with_arrival_date: true}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<parcel-component v-for="packages in data.packages" :data="packages" :key="packages.id"></parcel-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
<div class="col-12 col-md">
|
||||
<warehouse-section-component :data="{{$id}}"></warehouse-section-component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="row">
|
||||
<div class="col">
|
||||
<warehouse-details-section-component :company__id={{$id}}></customer-profile-section-component>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="row">
|
||||
<div class="col">
|
||||
<div class="row m-b-50">
|
||||
<div class="col">
|
||||
<monthly-sales-report-section-component></monthly-sales-report-section-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-50">
|
||||
<div class="col">
|
||||
<service-report-section-component></service-report-section-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -1,25 +0,0 @@
|
||||
@extends('layouts.base_portal')
|
||||
@section('inner_content')
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row d-none" :class="[{'d-flex': $store.getters.isAdmin}]" v-if="$store.getters.isAdmin">
|
||||
<div class="col-6">
|
||||
<div class="row p-b-5 b-b b-grey m-b-10 m-l-0 m-r-0">
|
||||
<div class="col no-padding">
|
||||
<h6>Warehouse List</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-l-0 m-r-0">
|
||||
<div class="col">
|
||||
<list-component key="2" section="customerListSection" :endpoint="route('api.company.list')" :options="{'has_business_module_type':1}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<company-component :data="data"></company-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -2,38 +2,11 @@
|
||||
@section('inner_content')
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<div class="row p-b-5 b-b b-grey m-b-10 m-l-0 m-r-0">
|
||||
<div class="col no-padding">
|
||||
<h6>Arrived Parcel</h6>
|
||||
</div>
|
||||
</div>
|
||||
<list-component section="warehouseListSection" :endpoint="route('api.packing_list.list')" :options="{packing_list_type: 1, packing_list_status: 2, per_page: 5, order_by: {column: 'arrival_date', DESC: true}, with_arrival_date: true}">
|
||||
<list-component section="warehouseListSection" :endpoint="route('api.packing_list.list')" :options="{packing_list_type: 1, packing_list_status: 2, per_page: 20, order_by: {column: 'arrival_date', DESC: true}, with_arrival_date: true}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<parcel-component v-for="packages in data.packages" :data="packages" :key="packages.id"></parcel-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="row p-b-5 b-b b-grey m-b-10 m-l-0 m-r-0">
|
||||
<div class="col no-padding">
|
||||
<h6>On Hold Parcel</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center m-b-5 p-b-10 b-b b-grey muted all-caps fs-10">
|
||||
<div class="col-2">Marking</div>
|
||||
<div class="col text-center">Quantity</div>
|
||||
<div class="col">CBM</div>
|
||||
<div class="col">Overweight CBM</div>
|
||||
<div class="col">Total CBM</div>
|
||||
<div class="col">status</div>
|
||||
<div class="col">Delivery Date</div>
|
||||
<div class="col"></div>
|
||||
</div>
|
||||
<list-component section="onHoldParcel" :endpoint="route('api.packing_list.list')" :options="{status_in: [5, 0], per_page: 5}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<warehouse-packing-list-component :data="data"></warehouse-packing-list-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="container-fluid">
|
||||
<div class="row no-margin">
|
||||
<div class="col p-l-0 p-t-20 p-b-20 sm-text-center">
|
||||
<small class="small no-margin pull-left sm-pull-reset all-caps fs-10 muted" style=" letter-spacing: 1px; ">Copyright © {{ date('Y'); }} CIEF IZYIM. All rights reserved.</small>
|
||||
<small class="small no-margin pull-left sm-pull-reset all-caps fs-10 muted" style=" letter-spacing: 1px; ">Copyright © 2021 CIEF IZYIM. All rights reserved.</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -32,7 +32,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="border-bottom: solid 2px #000000;">
|
||||
<h1 style="font-size: 50px; line-height: 70px">{{$marking}}{{$order->reference}}</h1>
|
||||
<h1 style="font-size: 50px; line-height: 70px">{{$marking}}/{{$order->reference}}</h1>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -40,7 +40,6 @@
|
||||
<p style="font-size: 30px; margin-bottom: 0 !important; margin-top: 10px !important;">仓库地址:</p>
|
||||
<p style="margin-top: 5px !important; margin-bottom: 5px !important; word-wrap: break-word; font-size: 30px;">{{$warehouse_address->state->name.' '.$warehouse_address->district->name.' '.$warehouse_address->street_one.' '.$warehouse_address->street_two.' 邮编:'.$warehouse_address->postcode}}</p>
|
||||
<p style="margin-top: 5px !important; margin-bottom: 0px !important; font-size: 30px;">联系:@foreach($warehouse_contacts as $contact){{ $loop->first ? '' : ' / ' }}{{ $contact->phone.' '.$contact->reference }}@endforeach</p>
|
||||
<p style="margin-top: 5px !important; margin-bottom: 0px !important; font-size: 30px;">{{$remark}}</p>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
+4
-1
@@ -54,7 +54,10 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function
|
||||
|
||||
require __DIR__ . '/announcement.php';
|
||||
|
||||
require __DIR__ . '/report.php';
|
||||
Route::get('/report/customer/{marking}/{from?}/{to?}', 'Reports\MonthlyReportController@customerReport')->name('report.customer');
|
||||
Route::get('/report/sales/{from?}/{to?}', 'Reports\MonthlyReportController@salesReport')->name('report.sales');
|
||||
Route::get('/report/profit/{model}/{value}/{from?}/{to?}', 'Reports\MonthlyReportController@profitModelReport')->name('report.profit');
|
||||
Route::get('/report/service', 'Reports\MonthlyReportController@serviceReport')->name('report.service');
|
||||
|
||||
});
|
||||
|
||||
|
||||
+1
-2
@@ -32,5 +32,4 @@ Route::group(['prefix' => 'company', 'as' => 'company.', 'namespace' => 'Compani
|
||||
Route::put('/{document_id}/approval/{status}', 'ApproveIdentificationDocumentController@approve')->where('status', 'approve|reject')->name('approval');
|
||||
});
|
||||
|
||||
Route::get('/module/list', 'ListCompanyModulesController@list')->name('module.list');
|
||||
});
|
||||
});
|
||||
@@ -18,4 +18,6 @@ Route::group(['prefix' => 'order', 'as' => 'order.', 'namespace' => 'Orders'], f
|
||||
|
||||
Route::put('/assign-remark/{id}', 'AssignOrderRemarkController@create')->name('assign.remark');
|
||||
Route::get('/{id}/shipping-cost', 'ShippingCostController@calculate')->name('shipping.cost');
|
||||
|
||||
Route::post('/{id}/remark/create', 'CreateOrderRemarkController@create')->name('remark.create');
|
||||
});
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Route;
|
||||
Route::group(['namespace' => 'Remarks', 'as' => 'remark.', 'prefix' => 'remark'], function () {
|
||||
Route::get('/{id}/show', 'FetchRemarkController@fetch')->name('show');
|
||||
Route::get('/list', 'ListRemarksController@list')->name('list');
|
||||
Route::post('/{id}/create', 'CreateRemarkController@create')->name('create');
|
||||
Route::post('/create', 'CreateRemarkController@create')->name('create');
|
||||
Route::put('/update/{id}', 'UpdateRemarkController@update')->name('update');
|
||||
Route::delete('/delete/{id}', 'DeleteRemarkController@delete')->name('delete');
|
||||
});
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::group(['prefix' => 'report', 'as' => 'report.', 'namespace' => 'Reports'], function () {
|
||||
Route::get('/customer/{marking}/{from?}/{to?}', 'MonthlyReportController@customerReport')->name('customer');
|
||||
|
||||
Route::get('/sales/{from?}/{to?}', 'MonthlyReportController@salesReport')->name('sales');
|
||||
|
||||
Route::get('/profit/{model}/{value}/{from?}/{to?}', 'MonthlyReportController@profitModelReport')->name('profit');
|
||||
|
||||
Route::get('/service', 'MonthlyReportController@serviceReport')->name('service');
|
||||
});
|
||||
@@ -13,7 +13,5 @@ Route::group(['prefix' => 'segment', 'as' => 'segment.', 'namespace' => 'Segment
|
||||
Route::put('/service/update', 'UpdateCustomServiceConstantController@update')->name('service.update');
|
||||
Route::put('/update', 'UpdateConstantController@update')->name('update');
|
||||
Route::get('/show/{reference}', 'FetchConstantController@fetch')->name('show');
|
||||
Route::put('/update/state', 'UpdateConstantStateController@update')->name('update.state');
|
||||
Route::put('/update/postcode', 'UpdateConstantPostcodeController@update')->name('update.postcode');
|
||||
});
|
||||
});
|
||||
+2
-72
@@ -80,10 +80,6 @@ Route::get('/warehouse-list', function () {
|
||||
return view('pages.warehouse_list');
|
||||
})->name('warehouse.list');
|
||||
|
||||
Route::get('/delivery-list', function () {
|
||||
return view('pages.delivery_list');
|
||||
})->name('delivery.list');
|
||||
|
||||
Route::get('/unclaimed-packinglist', function () {
|
||||
return view('pages.unclaimed_packinglist');
|
||||
})->name('unclaimed-packinglist.list');
|
||||
@@ -103,12 +99,6 @@ Route::get('/customer/{marking}', function ($marking) {
|
||||
return view('pages.customers.profile', ['id' => $id]);
|
||||
})->name('customer.profile');
|
||||
|
||||
Route::get('/customer/{marking}/details', function ($marking) {
|
||||
$connection = CompanyConnection::where('invitee_reference', $marking)->first();
|
||||
$id = $connection->invitee->company->id;
|
||||
return view('pages.customers.profile_details', ['id' => $id]);
|
||||
})->name('customer.profile.details');
|
||||
|
||||
Route::get('/orders/refresh', function(){
|
||||
|
||||
FetchWarehouseReceiveListFromVTPortalJob::withChain([
|
||||
@@ -125,9 +115,8 @@ Route::get('/orders/refresh', function(){
|
||||
|
||||
Route::get('/containers/refresh', function(){
|
||||
|
||||
(App()->make(\App\Classes\Modules\PackingLists\Processors\FetchPackingListFromVTPortalProcessor::class))->execute();
|
||||
// FetchLoadedContainersFromVTPortalJob::dispatch();
|
||||
// FetchContainersStatusUpdateFromVTPortalJob::dispatch();
|
||||
FetchContainersStatusUpdateFromVTPortalJob::dispatch();
|
||||
|
||||
return redirect('orders');
|
||||
|
||||
@@ -201,34 +190,9 @@ Route::get('/debug', function (){
|
||||
});
|
||||
|
||||
Route::get('/yd', function (){
|
||||
(App()->make(FetchOrderListsFromYdPortalProcessor::class))->execute();
|
||||
(App()->make(FetchOrderListsFromYdPortalProcessor::class))->execute();;
|
||||
});
|
||||
|
||||
Route::get('/min_cbm', function (){
|
||||
$companies = CompanyModule::where('type', \App\Classes\ValueObjects\Constants\BusinessType::IMPORTER)->whereHas('orders', function ($query){
|
||||
return $query->whereHas('packingLists')->whereDoesntHave('packingLists', function($query){
|
||||
return $query->whereHas('packages', function($query){
|
||||
return $query->selectRaw('sum((width/100) * (height/100) * (length/100) * quantity) as cbm')->where('type', \App\Classes\ValueObjects\Constants\PackingListType::SHIPPING_PACKING_LIST)->where('status', '!=', 5)->having('cbm', '>', 0.3);
|
||||
});
|
||||
});
|
||||
})->limit(1)->get();
|
||||
|
||||
$i = 0;
|
||||
foreach ($companies as $company) {
|
||||
$marking = $company->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference;
|
||||
echo '<a href="'.route('customer.profile', $marking).'" target="_blank">'.$i++.'. '.$marking.'</a><br>';
|
||||
}
|
||||
});
|
||||
|
||||
Route::get('/warehouse', function () {
|
||||
return view('pages.warehouse');
|
||||
})->name('warehouse');
|
||||
|
||||
Route::get('/warehouse/{id}/show', function ($id) {
|
||||
// $connection = CompanyConnection::where('invitee_reference', '2417MEN')->first();
|
||||
// $id = $connection->invitee->company->id;
|
||||
return view('pages.templates.warehouseDetails', ['id' => $id]);
|
||||
})->name('warehouse.show');
|
||||
Route::get('/export/customer-latest-order-date/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export');
|
||||
Route::get('/export/packing-list/{id}', 'Exports\ExportContainerPackingListController@export')->name('container.packaging_list.export');
|
||||
|
||||
@@ -238,37 +202,3 @@ Route::get('/settings', function () {
|
||||
Route::get('/settings', function () {
|
||||
return view('pages.settings');
|
||||
})->name('settings');
|
||||
|
||||
Route::get('/customers/active/{active_start}/{active_end}/{inactive_start?}/{inactive_end?}/{with_cbm?}', function ($active_start, $active_end, $inactive_start=null, $inactive_end=null, $with_cbm = false) {
|
||||
$activeCompanies = CompanyModule::where('type', \App\Classes\ValueObjects\Constants\BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($inactive_start, $inactive_end) {
|
||||
return $query->where('packing_lists.type', \App\Classes\ValueObjects\Constants\PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($inactive_start, $inactive_end) {
|
||||
return $query->where('drop_date', '>=', \Carbon\Carbon::parse($inactive_start))->where('drop_date', '<=', \Carbon\Carbon::parse($inactive_end)->addDay());
|
||||
});
|
||||
})->pluck('id');
|
||||
|
||||
$companies = CompanyModule::where('type', \App\Classes\ValueObjects\Constants\BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($active_start, $active_end) {
|
||||
return $query->where('packing_lists.type', \App\Classes\ValueObjects\Constants\PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($active_start, $active_end) {
|
||||
return $query->whereDate('drop_date', '>=', \Carbon\Carbon::parse($active_start))->whereDate('drop_date', '<=', \Carbon\Carbon::parse($active_end)->addDay());
|
||||
});
|
||||
})->whereNotIn('id', $activeCompanies)->get();
|
||||
|
||||
echo '<h4>List of customers active between <span style="color: green; font-weight: bold">'.\Carbon\Carbon::parse($active_start)->format('d/m/Y'). ' - '.\Carbon\Carbon::parse($active_end)->format('d/m/Y').'</span> & inactive between <span style="color: red; font-weight: bold">'.\Carbon\Carbon::parse($inactive_start)->format('d/m/Y'). ' - '.\Carbon\Carbon::parse($inactive_end)->format('d/m/Y').'</span></h4>';
|
||||
foreach ($companies as $key => $company){
|
||||
$connection = $company->inviters()->withPivot('invitee_reference')->first();
|
||||
$marking = $connection ? $connection->pivot->invitee_reference:'';
|
||||
|
||||
if($with_cbm){
|
||||
$packingList = $company->orderPackingLists()->where('packing_lists.type', \App\Classes\ValueObjects\Constants\PackingListType::SHIPPING_PACKING_LIST)->get();
|
||||
$totalCbm = $packingList->flatMap(function ($packingList) {
|
||||
return $packingList->packages;
|
||||
})->sum(function($package){
|
||||
return (( (float) $package->width / 100) * ( (float) $package->length / 100) * ( (float) $package->height / 100)) * $package->quantity;
|
||||
});
|
||||
}
|
||||
|
||||
$totalCbm = ($with_cbm ? '['. $packingList->count().'] ('. $totalCbm .')' : '');
|
||||
|
||||
echo $key + 1 .'. <a href="'.\route('customer.profile', $marking).'" target="_blank">'.$marking.'</a> '.$totalCbm.'<br><br>';
|
||||
}
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user