BConnect POS - Reference PHP

InventoryStockController extends AbstractController
in package

Management of warehouse-stock inventories.

Allows creating an inventory (for a single item or for all items), viewing its detail, archiving it and feeding the DataTables lists. Operations are scoped to the point of sale of the authenticated user.

Attributes
#[IsGranted]
'IS_AUTHENTICATED_FULLY'
#[Route]
'/inventory/stock'

Table of Contents

Methods

ArchiveInventory()  : Response
Method for archived a inventory
create()  : RedirectResponse|Response
This method creates a new inventory for a single product.
createInventoryForAllProduct()  : Response
This method creates a new inventory for all products in stock.
datatable()  : JsonResponse
Provides paginated/filtered stock-inventory data in the DataTables server-side format.
delete()  : RedirectResponse
Method for deleting a inventory
desarchiveInventory()  : Response
Method for desarchived a inventory
index()  : Response
Index route to display the list of inventories.
indexArchive()  : Response
Method for archived a inventory
showDetailInventory()  : Response
Show a retail for single inventory

Methods

ArchiveInventory()

Method for archived a inventory

public ArchiveInventory(InventoryStock $inventory, EntityManagerInterface $entityManager) : Response
Parameters
$inventory : InventoryStock
$entityManager : EntityManagerInterface
Attributes
#[Route]
'/archive/inventory/{id}'
$name: 'inventory.stock.archive'
Return values
Response

create()

This method creates a new inventory for a single product.

public create(EntityManagerInterface $doctrine, Request $request) : RedirectResponse|Response
Parameters
$doctrine : EntityManagerInterface
$request : Request
Attributes
#[Route]
'/create'
$name: 'inventory.stock.create'
Return values
RedirectResponse|Response

createInventoryForAllProduct()

This method creates a new inventory for all products in stock.

public createInventoryForAllProduct(EntityManagerInterface $entityManager, Request $request) : Response
Parameters
$entityManager : EntityManagerInterface
$request : Request
Attributes
#[Route]
'/create/inventory/stock'
$name: 'inventory.stock.create.all.product'
Return values
Response

datatable()

Provides paginated/filtered stock-inventory data in the DataTables server-side format.

public datatable(EntityManagerInterface $entityManager, Request $request, DataTableService $dataTableService) : JsonResponse
Parameters
$entityManager : EntityManagerInterface

Doctrine entity manager.

$request : Request

Request carrying the DataTables parameters.

$dataTableService : DataTableService

Service building the DataTables response.

Attributes
#[Route]
'/datatable'
$name: 'inventory.stock.datatable'
$methods: ['GET']
Return values
JsonResponse

DataTables-compatible JSON response.

delete()

Method for deleting a inventory

public delete(ProductStock $product, EntityManagerInterface $manager) : RedirectResponse
Parameters
$product : ProductStock
$manager : EntityManagerInterface
Attributes
#[Route]
'/delete/{id}'
$name: 'inventory.stock.delete'
Return values
RedirectResponse

desarchiveInventory()

Method for desarchived a inventory

public desarchiveInventory(InventoryStock $inventory, EntityManagerInterface $entityManager) : Response
Parameters
$inventory : InventoryStock
$entityManager : EntityManagerInterface
Attributes
#[Route]
'/desarchive/inventory/{id}'
$name: 'inventory.stock.desarchive'
Return values
Response

indexArchive()

Method for archived a inventory

public indexArchive(EntityManagerInterface $entityManager) : Response
Parameters
$entityManager : EntityManagerInterface
Attributes
#[Route]
'/archive'
$name: 'inventory.stock.index.archive'
Return values
Response

showDetailInventory()

Show a retail for single inventory

public showDetailInventory(InventoryStock $inventory) : Response
Parameters
$inventory : InventoryStock
Attributes
#[Route]
'/show/inventory/{id}'
$name: 'inventory.stock.show.retail'
Return values
Response
On this page

Search results