src/ShopDhlPackstationBundle/pkgShop/objects/db/TShopOrderStep/TPkgShopDhlPackstation_ShopStepUserDataV2.class.php
public function ChangeSelectedAddress()
    {
        $oUser = self::getExtranetUserProvider()->getActiveUser();
        if ($oUser->IsLoggedIn()) {
            $newShippingAddressId = $this->GetShippingAddressData('selectedAddressId');
            $newBillingAddressId = $this->GetBillingAddressData('selectedAddressId');
            if ('new' !== $newShippingAddressId) {
                $this->updateStepAddressDataForAddressId($newShippingAddressId, $newBillingAddressId);

                if ($newShippingAddressId === $newBillingAddressId &&
                    true === $this->isShipToBillingAddressAndBillingAddressIsPackstation()
                ) {
                    $this->SetShipToBillingAddress('0');
                    $newBillingAddress = $oUser->GetBillingAddress();
                    $this->SetBillingAddressData($newBillingAddress->sqlData);
                    $this->getFlashMessageService()->addMessage(
                        TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING,
                        'PkgShopDhlPackstation-ERROR-BILLING-MAY-NOT-BE-PACKSTATION'
                    );
                }
            }
        }
        parent::ChangeSelectedAddress();
    }
public function ChangeSelectedAddress()
    {
        $oUser = self::getExtranetUserProvider()->getActiveUser();
        if ($oUser->IsLoggedIn()) {
            $newShippingAddressId = $this->GetShippingAddressData('selectedAddressId');
            $newBillingAddressId = $this->GetBillingAddressData('selectedAddressId');
            if ('new' !== $newShippingAddressId) {
                $this->updateStepAddressDataForAddressId($newShippingAddressId, $newBillingAddressId);

                if ($newShippingAddressId === $newBillingAddressId &&
                    true === $this->isShipToBillingAddressAndBillingAddressIsPackstation()
                ) {
                    $this->SetShipToBillingAddress('0');
                    $newBillingAddress = $oUser->GetBillingAddress();
                    $this->SetBillingAddressData($newBillingAddress->sqlData);
                    $this->getFlashMessageService()->addMessage(
                        TdbDataExtranetUserAddress::FORM_DATA_NAME_BILLING,
                        'PkgShopDhlPackstation-ERROR-BILLING-MAY-NOT-BE-PACKSTATION'
                    );
                }
            }
        }
        parent::ChangeSelectedAddress();
    }
public function ChangeSelectedAddress ( ) { $ oUser = self :: getExtranetUserProvider ( ) -> getActiveUser ( ) ; if ( $ oUser -> IsLoggedIn ( ) ) { $ newShippingAddressId = $ this -> GetShippingAddressData ( 'selectedAddressId' ) ; $ newBillingAddressId = $ this -> GetBillingAddressData ( 'selectedAddressId' ) ; if ( 'new' !== $ newShippingAddressId ) { $ this -> updateStepAddressDataForAddressId ( $ newShippingAddressId , $ newBillingAddressId ) ; if ( $ newShippingAddressId === $ newBillingAddressId && true === $ this -> isShipToBillingAddressAndBillingAddressIsPackstation ( ) ) { $ this -> SetShipToBillingAddress ( '0' ) ; $ newBillingAddress = $ oUser -> GetBillingAddress ( ) ; $ this -> SetBillingAddressData ( $ newBillingAddress -> sqlData ) ; $ this -> getFlashMessageService ( ) -> addMessage ( TdbDataExtranetUserAddress :: FORM_DATA_NAME_BILLING , 'PkgShopDhlPackstation-ERROR-BILLING-MAY-NOT-BE-PACKSTATION' ) ; } } } parent :: ChangeSelectedAddress ( ) ; }
Set correct billing address if new selected shipping address is packstation.

{@inheritdoc}
Set correct billing address if new selected shipping address is packstation .