mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Merge branches 'vapor/development' and 'vapor/production' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into vapor/development
This commit is contained in:
@@ -9,6 +9,8 @@ use App\Classes\Modules\PackingLists\Standards\Rules\Packages\CanCreatePackage;
|
||||
use App\Classes\ValueObjects\Constants\WarehouseReferences;
|
||||
use App\Models\Order;
|
||||
use App\Models\PackingList;
|
||||
use App\Models\Segment;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class CreatePackageProcessor
|
||||
{
|
||||
@@ -53,6 +55,14 @@ class CreatePackageProcessor
|
||||
|
||||
if($replica->owner->owner instanceof Order){
|
||||
$modificationValue = in_array( $replica->owner->owner->companyModule->id, WarehouseReferences::REPLICA_WHITE_LIST) ? 0 : 1;
|
||||
|
||||
// if customer in segment 'No Extra Centimeter Charged'
|
||||
$segmentId = Segment::where('name', 'No Extra Centimeter Charged')->first()->id;
|
||||
$companySegments = $replica->owner->owner->companyModule->connections()->first()->segments->pluck('id')->toArray();
|
||||
if (in_array($segmentId, $companySegments)) {
|
||||
$modificationValue = 0;
|
||||
Log::info('No Extra Centimeter Charged segment working');
|
||||
}
|
||||
}
|
||||
|
||||
$packageObject = new PackageObject($object->getType(), $object->getDescription(), $object->getWidth() + $modificationValue, $object->getHeight() + $modificationValue, $object->getLength() + $modificationValue, $object->getWeight(), $object->getQuantity(), $object->getStatus());
|
||||
|
||||
Reference in New Issue
Block a user