Lists all customers linked to the commercial sector

@param $id
@return string
@throws \GuzzleHttp\Exception\GuzzleException
196786
public function customers($id)
    {
        $customers = $this->execute(
            self::HTTP_GET,
            self::DOMUSERP_API_OPERACIONAL . '/setorcomercial/' . $id . '/clientes'
        );

        return $customers;
    }
882864
public function getShow($id)
    {
        $response = $this->modelService->getBy($id);

        //return resource listing view
        return view(\OogleeUConfig::get('config.user_view.view'), compact('response'));
        
    }
62019
public function showAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var Transaction $entity */
        $entity = $em->getRepository('EcommerceBundle:Transaction')->find($id);

        if (!$entity) {
            throw $this->createNotFoundException('Unable to find Transaction entity.');
        }

        /** @var CheckoutManager $checkoutManager */
        $checkoutManager = $this->get('checkout_manager');

        $totals = $checkoutManager->calculateTotals($entity, $entity->getDelivery());

        return array(
            'entity' => $entity,
            'totals' => $totals,
        );
    }
995729
public function actionUpdate($id)
    {
        if (Yii::$app->request->post('_asnew') == '1') {
            $model = new Customer();
        } else {
            $model = $this->findModel($id);
        }
        if ($model->loadAll(Yii::$app->request->post()) && $model->saveAll()) {
            return $this->redirect([
                'view',
                'id' => $model->id,
            ]);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
1052374
public function actionView($id)
    {
        $request = \Yii::$app->request;
        if ($request->getIsOptions()) {
            return $this->ResponseOptions($this->verbs()['view']);
        }
        $model = $this->findModel($id);

        return  ['model'=>$model,'items'=>$model->getItems(),];
    }
1268754
public function editAction($id)
        {

            /** @var Customer $oCustomer */
            $oCustomer = CustomerQuery::create()->findOneById($id);

            if (count($oCustomer) === 0) {
                throw $this->createNotFoundException('Unable to find Customer entity.');
            }

            $oEditForm   = $this->createEditForm($oCustomer);
            $oDeleteForm = $this->createDeleteForm($id);

            return $this->render('SlashworksAppBundle:Customer:edit.html.twig', array(
                'entity'      => $oCustomer,
                'edit_form'   => $oEditForm->createView(),
                'delete_form' => $oDeleteForm->createView(),
            ));
        }
1050337
public function agreementListJsonAction($id)
    {
        $em = $this->getDoctrine()->getManager();

        $contract = $em->getRepository('EcommerceBundle:Contract')->find($id);
        /** @var \Kitchenit\AdminBundle\Services\DataTables\JsonList $jsonList */
        $jsonList = $this->get('json_list');
        $jsonList->setRepository($em->getRepository('EcommerceBundle:Transaction'));
        $jsonList->setAgreementId($contract->getAgreement()->getId());
        $response = $jsonList->get();

        return new JsonResponse($response);
    }
968649
public function showAction($id)
    {
        $hub     = $this->getRepo('Profile')->find($id);
        $origin  = $hub->getDefaultLocation();
        $buyer   = $this->getUser()->getCurrentProfile();

        if (!$hub)
        {
            throw $this->createNotFoundException('No hub found for id '.$id);
        }

        $buyerHubRef = $this->getRepo('BuyerHubRef')->findOneByBuyerAndHub($buyer, $hub);

        return $this->render('HarvestCloudCoreBundle:Buyer/Hub:show.html.twig', array(
          'hub'         => $hub,
          'buyerHubRef' => $buyerHubRef,
          'origin'      => $origin,
        ));
    }
1213219
public function getAction($id)
    {
        $view = $this->responseGetById(
            $id,
            function($id) {
                return $this->getDoctrine()
                    ->getRepository(self::$entityName)
                    ->find($id);
            }
        );

        return $this->handleView($view);
    }
978092
public function listAction($productId)
    {
        $this->checkAuth(AdminResources::PRODUCT, [], AccessManager::VIEW);

        if (null !== $response = $this->checkProduct($productId)) {
            return $response;
        }

        $request = $this->getRequest();

        if ($request->query->has('id')) {
            $request->query->remove('id');
        }

        $params = array_merge(
            array(
                "limit" => 10,
                "offset" => 0,
            ),
            $request->query->all(),
            array(
                "product" => $productId,
            )
        );

        return new JsonResponse($this->getProductSaleElements($params));
    }
477944
public function show($id)
	{
		$entity = $this->getModel()->getRepository()->getById($id);

		return $this->response()
			->item($entity)
			->view($this->getView('show'), [
				'entity' => $entity
			]);
	}
1276026
public function searchById($id)
    {
        return App::make('iverberk.larasearch.response.result', $this->config['client']->get(
                [
                    'index' => $this->getIndex()->getName(),
                    'type' => $this->getType(),
                    'id' => $id
                ]
            )
        );
    }
156721
public function load($id)
    {

        // if not, try to load the customer with the passed entity ID
        $this->customerAddressStmt->execute(array(MemberNames::ENTITY_ID => $id));
        return $this->customerAddressStmt->fetch(\PDO::FETCH_ASSOC);
    }
499916
public function actionFollower($id)
    {
        $model = $this->findModel($id);
        $dataProvider = new ActiveDataProvider([
            'query' => $model->getFans()->orderBy(['created_at' => SORT_DESC]),
        ]);
        return $this->render('follower', [
            'model' => $model,
            'dataProvider' => $dataProvider
        ]);
    }
435410
public function actionView($id)
    {
        $model = $this->findModel($id);
        $providerProductUnitEquivalent = new \yii\data\ArrayDataProvider([
            'allModels' => $model->productUnitEquivalents,
        ]);
        return $this->render('view', [
            'model' => $this->findModel($id),
            'providerProductUnitEquivalent' => $providerProductUnitEquivalent,
        ]);
    }
20186
public function indexByUser($id)
    {
        $user = \App\User::find($id);

        if (!$user) {
            return response()->json(null, 404);
        }

        $roles = Role::browseByUser([
            'order'     => [ Input::get('sort', 'name') => Input::get('direction', 'asc') ],
            'limit'     => ($limit = (int)Input::get('limit', 25)),
            'offset'    => (Input::get('page', 1) - 1) * $limit,
            'user'      => $user
        ]);

        return response()->json(arrayView('phpsoft.users::role/browse', [
            'roles' => $roles,
        ]), 200);
    }
418689
public function findInvoice($id)
	{
		$invoice = $this->subscription()->findInvoice($id);

		if ($invoice && $invoice->customer == $this->getBraintreeId()) {
			return $invoice;
		}
	}