# CompanyBranchController

**Kind:** Controller

**Source:** `Pams/API/Pams.API/Controllers/Organization/CompanyBranchController.cs` (line 21)

**Part of:** [Pams](subsystem-pams)

## Where it refuses work

- `CompanyBranchController` stops the work with an early return when `isSaved`, in 4 places.
- `CompanyBranchController` stops the work with an early return when `!item.Save()`, in 2 places.
- `CompanyBranchController` stops the work with an early return when `!logic.IsAllowedToAddBranchAsPerSubscription(CompanyID)`.
- `CompanyBranchController` stops the work with an early return when `CheckForDublicate.HasObject`.
- `CompanyBranchController` stops the work with an early return when `!new CompanyBranchLogic().IsFound(ID)`.
- `CompanyBranchController` stops the work with an early return when `isDeleted == Business.Entity.EnumNewSales.EnumReturnMessage.DeletedSuccessfuly`.

## When something fails

- `CompanyBranchController` handles failure in 2 places: it turns it into a return value in all 2.

## Relationships

- MODULE_DECLARES → `Save`
- MODULE_DECLARES → `insert`
- MODULE_DECLARES → `update`
- MODULE_DECLARES → `delete`
- MODULE_DECLARES → `MakeMain`
- MODULE_DECLARES → `UpdateLogo`
- MODULE_DECLARES → `UploadBranchImage`
- MODULE_DECLARES → `saveimg`
- MODULE_DECLARES → `UpdateISOLogo`
- MODULE_DECLARES → `UpdateRefrenceMargin`
- MODULE_DECLARES → `GetTwoFactorAuthorization`
- MODULE_DECLARES → `SetTwoFactorAutherization`
- MODULE_DECLARES → `UpdateEmployeeBonusCalcType`
- MODULE_DECLARES → `GetEmployeeBonusCalcType`
- IMPORTS → `CompanyBranch`
- IMPORTS → `BaseController`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `Save`
- IMPORTS → `CompanyBranchBindingModel`
- IMPORTS → `Person`
- IMPORTS → `TeamBindingModel`
- IMPORTS → `Account`
- IMPORTS → `CompanyBranchAccount`
- IMPORTS → `Address`
- IMPORTS → `ContactInfoRelatedType`
- IMPORTS → `ContactInfo`
- IMPORTS → `ContactInfoBindingModel`
- IMPORTS → `UnitOfWork`
- IMPORTS → `CompanyBranchBankAccountBindingModel`
- IMPORTS → `CompanyBranchBankAccount`
- IMPORTS → `AccountType`
- IMPORTS → `Employee`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `Delete`
- IMPORTS → `UpdateLogo`
- IMPORTS → `Files`
- IMPORTS → `UploadFile`
- IMPORTS → `AddressController`
- IMPORTS → `BranchMarginBindingModel`
- IMPORTS → `SecurityBindingModel`
- IMPORTS → `EmployeeBonusCalcTypeHeaderBindingModel`

## Used by

4 references from 4 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

### calls by (4)

- `AuthService` — `Pams/Web/portal/pams-web/src/app/services/security/auth.service.ts`:1
- `AppSettings` — `Frontend/src/app/settings/app/app.settings.ts`:241
- `AppSettings` — `Pams/Web/Pams.Web/Client/app/settings/app/app.settings.ts`:126
- `AppSettings` — `Pams/Web/Pams.WebApp/Client/app/settings/app/app.settings.ts`:6
