mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-27 16:34:27 +00:00
update replica packages logic and over weight price announcement
This commit is contained in:
@@ -58,6 +58,14 @@ class PackingList extends AbstractModel implements Transportable, Steppable, Pac
|
||||
return $this->hasMany(Package::class, 'packing_list_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return HasManyDeep
|
||||
*/
|
||||
public function replicatedPackages(): HasManyDeep
|
||||
{
|
||||
return $this->hasManyDeep(Package::class, [PackingList::class.' as replica', PackingList::class], [['owner_type', 'owner_id'], ['owner_type', 'owner_id'], 'packing_list_id'], [null, null, 'id']);
|
||||
return $this->hasManyDeepFromRelations($this->packingLists(), (new PackingList)->setAlias('replica')->packages());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return morphMany
|
||||
|
||||
Reference in New Issue
Block a user