mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-31 10:24:07 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1578085bab |
@@ -20,7 +20,7 @@ class AssignsAnnouncementToSegment extends AbstractUpdateRecord
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$announcement->segments()->attach($segment);
|
$announcement->segments()->attach($segment, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
|
|
||||||
return $announcement;
|
return $announcement;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -20,7 +20,7 @@ class AssignsCompanyConnectionToConnectionSegment extends AbstractUpdateRecord
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$companyConnection->segments()->attach($segment);
|
$companyConnection->segments()->attach($segment, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
|
|
||||||
return $companyConnection;
|
return $companyConnection;
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class AssignsCompanyToSegment extends AbstractUpdateRecord
|
|||||||
try {
|
try {
|
||||||
$companyModule = $company->companyModules()->where('type', BusinessType::IMPORTER)->first();
|
$companyModule = $company->companyModules()->where('type', BusinessType::IMPORTER)->first();
|
||||||
$connection = $companyModule->connections()->where('inviter_reference', 'CIEF');
|
$connection = $companyModule->connections()->where('inviter_reference', 'CIEF');
|
||||||
$connection->segments()->attach($segment);
|
$connection->segments()->attach($segment, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
|
|
||||||
return $company;
|
return $company;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class AssignsEmployee extends AbstractUpdateRecord
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$object->getCompanyModule()->employees()->attach($object->getUser(), ['status' => $object->getStatus(),'role_id' => $object->getRoleId()]);
|
$object->getCompanyModule()->employees()->attach($object->getUser(), ['status' => $object->getStatus(), 'role_id' => $object->getRoleId(), 'created_at' => now(), 'updated_at' => now()]);
|
||||||
|
|
||||||
return $object->getCompanyModule();
|
return $object->getCompanyModule();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ class AssignPackingListContainerLogic extends AbstractControllerLogic
|
|||||||
|
|
||||||
foreach ($packing_list as $key => $row) {
|
foreach ($packing_list as $key => $row) {
|
||||||
$packing_list_item = $this->fetchesPackingList->execute(['id' => $row]);
|
$packing_list_item = $this->fetchesPackingList->execute(['id' => $row]);
|
||||||
$container->packingLists()->attach($packing_list_item);
|
$container->packingLists()->attach($packing_list_item, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->resourceResponse(new ContainerResource($container));
|
return $this->resourceResponse(new ContainerResource($container));
|
||||||
|
|||||||
+2
-2
@@ -129,7 +129,7 @@ class FetchContainersFromYdPortalProcessor
|
|||||||
try {
|
try {
|
||||||
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
|
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
|
||||||
$container->packingLists()->detach($packingList);
|
$container->packingLists()->detach($packingList);
|
||||||
$container->packingLists()->attach($packingList);
|
$container->packingLists()->attach($packingList, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
} catch (ResourceNotFoundException $exception){
|
} catch (ResourceNotFoundException $exception){
|
||||||
|
|
||||||
if(!($packingList->owner instanceof Order)) continue;
|
if(!($packingList->owner instanceof Order)) continue;
|
||||||
@@ -143,7 +143,7 @@ class FetchContainersFromYdPortalProcessor
|
|||||||
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
|
$container = $this->createContainerProcessor->execute($containerObject, $originWarehouse);
|
||||||
|
|
||||||
$container->packingLists()->detach($packingList);
|
$container->packingLists()->detach($packingList);
|
||||||
$container->packingLists()->attach($packingList);
|
$container->packingLists()->attach($packingList, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
|
|
||||||
if(config('perfexcrm.is_enabled') == 'true'){
|
if(config('perfexcrm.is_enabled') == 'true'){
|
||||||
$this->packingListToPerfexCRMProcessor->execute($packingList, PerfexCRMTasksYDStages::LOAD_CONTAINER);
|
$this->packingListToPerfexCRMProcessor->execute($packingList, PerfexCRMTasksYDStages::LOAD_CONTAINER);
|
||||||
|
|||||||
+1
-1
@@ -274,7 +274,7 @@ class FetchLoadedContainersFromVTPortalProcessor
|
|||||||
}
|
}
|
||||||
|
|
||||||
$container->packingLists()->detach($packingList);
|
$container->packingLists()->detach($packingList);
|
||||||
$container->packingLists()->attach($packingList);
|
$container->packingLists()->attach($packingList, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
$packingList->packages()->delete();
|
$packingList->packages()->delete();
|
||||||
|
|
||||||
$replica = $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
|
$replica = $packingList->packingLists()->where('type', PackingListType::SHIPPING_PACKING_LIST_REPLICA)->first();
|
||||||
|
|||||||
+1
-1
@@ -385,7 +385,7 @@ class FetchOrderListsFromYdPortalProcessor
|
|||||||
try {
|
try {
|
||||||
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
|
$container = $this->fetchesContainer->execute(['reference' => $containerReference]);
|
||||||
$container->packingLists()->detach($packingList);
|
$container->packingLists()->detach($packingList);
|
||||||
$container->packingLists()->attach($packingList);
|
$container->packingLists()->attach($packingList, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
} catch (ResourceNotFoundException $exception){
|
} catch (ResourceNotFoundException $exception){
|
||||||
|
|
||||||
if (!$allow_contract) {
|
if (!$allow_contract) {
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ class DummyDataSeeder extends Seeder
|
|||||||
$container = $this->faker->randomElement(Container::whereDate('loading_date', '>=', $receiveDate)->get());
|
$container = $this->faker->randomElement(Container::whereDate('loading_date', '>=', $receiveDate)->get());
|
||||||
|
|
||||||
// attach packing list to container
|
// attach packing list to container
|
||||||
$container->packingLists()->attach($shippingPackingList);
|
$container->packingLists()->attach($shippingPackingList, ['created_at' => now(), 'updated_at' => now()]);
|
||||||
|
|
||||||
if ($container->status !== ApprovalStatus::COMPLETED) {
|
if ($container->status !== ApprovalStatus::COMPLETED) {
|
||||||
// ==== //
|
// ==== //
|
||||||
|
|||||||
Reference in New Issue
Block a user