src/ShopDhlPackstationBundle/pkgExtranet/objects/db/TPkgShopDhlPackstation_DataExtranetUser.class.php
public function SetAddressAsBillingAddress($sAddressId)
    {
        $oNewBillingAdr = null;
        if (0 != strcmp($this->fieldDefaultBillingAddressId, $sAddressId)) {
            $oAdr = TdbDataExtranetUserAddress::GetNewInstance();
            if ($oAdr->LoadFromFields(
                array('id' => $sAddressId, 'data_extranet_user_id' => $this->id, 'is_dhl_packstation' => '0')
            )
            ) {
                $this->SaveFieldsFast(array('default_billing_address_id' => $sAddressId));
                $oNewBillingAdr = $this->GetBillingAddress(true);
            }
        } else {
            $oNewBillingAdr = $this->GetBillingAddress();
        }

        return $oNewBillingAdr;
    }
public function SetAddressAsBillingAddress($sAddressId)
    {
        $oNewBillingAdr = null;
        if (0 != strcmp($this->fieldDefaultBillingAddressId, $sAddressId)) {
            $oAdr = TdbDataExtranetUserAddress::GetNewInstance();
            if ($oAdr->LoadFromFields(
                array('id' => $sAddressId, 'data_extranet_user_id' => $this->id, 'is_dhl_packstation' => '0')
            )
            ) {
                $this->SaveFieldsFast(array('default_billing_address_id' => $sAddressId));
                $oNewBillingAdr = $this->GetBillingAddress(true);
            }
        } else {
            $oNewBillingAdr = $this->GetBillingAddress();
        }

        return $oNewBillingAdr;
    }
public function SetAddressAsBillingAddress ( $ sAddressId ) { $ oNewBillingAdr = null ; if ( 0 != strcmp ( $ this -> fieldDefaultBillingAddressId , $ sAddressId ) ) { $ oAdr = TdbDataExtranetUserAddress :: GetNewInstance ( ) ; if ( $ oAdr -> LoadFromFields ( array ( 'id' => $ sAddressId , 'data_extranet_user_id' => $ this -> id , 'is_dhl_packstation' => '0' ) ) ) { $ this -> SaveFieldsFast ( array ( 'default_billing_address_id' => $ sAddressId ) ) ; $ oNewBillingAdr = $ this -> GetBillingAddress ( true ) ; } } else { $ oNewBillingAdr = $ this -> GetBillingAddress ( ) ; } return $ oNewBillingAdr ; }
set address as new billing address... will check if the address belongs to the user.

@param $sAddressId

@return TdbDataExtranetUserAddress
set address as new billing address ... will check if the address belongs to the user .