BConnect POS - Reference PHP

Product
in package

Attributes
#[ApiResource]
$operations: [new \ApiPlatform\Metadata\GetCollection(), new \ApiPlatform\Metadata\Patch(denormalizationContext: ['groups' => ['product:update']]), new \ApiPlatform\Metadata\Get()]
$normalizationContext: ['groups' => ['product:read']]
$denormalizationContext: ['groups' => ['product:write']]
$filters: [\App\Filter\PointOfSaleParamFilter::class]
#[Entity]
$repositoryClass: \App\Repository\ProductRepository::class
#[Index]
$columns: ['status']
$name: "idx_status"
#[Index]
$columns: ['name']
$name: "idx_name"
#[Index]
$columns: ['archive_status']
$name: "idx_archive_status"
#[UniqueConstraint]
$name: 'uniq_product_name_by_pos'
$columns: ['name', 'point_of_sale_id', 'barcode']
#[UniqueEntity]
$fields: ['name', 'pointOfSaleId']
$message: "Le nom du produit doit ĂȘtre unique par point de vente"
#[UniqueEntity]
$fields: ['barcode', 'pointOfSaleId']
$message: "Le code barre doit ĂȘtre unique"

Table of Contents

Constants

ACTIF  : mixed = "ACTIF"
AUCUN  : mixed = "AUCUN"
INACTIF  : mixed = "INACTIF"

Properties

$currentAlertType  : string|null
$alert_threshold_sale  : int|null
$alert_threshold_warehouse  : int|null
$approval_certificate  : string|null
$archive_status  : bool|null
$barcode  : string|null
$bulk_price  : float|null
$carts  : Collection
$category  : Category|null
$certificate_origin  : string|null
$created_at  : DateTimeImmutable|null
$description  : string|null
$expiration_date  : DateTimeInterface|null
$historyPurchaseOrders  : Collection
$id  : int|null
$image  : string|null
$inventoryProducts  : Collection
$invoice_purchase  : string|null
$isRawMaterial  : bool|null
$manufacturing_date  : DateTimeInterface|null
$name  : string|null
$pointOfSaleId  : int|null
$productVariants  : Collection
$purchase_date  : DateTimeInterface|null
$purchase_price  : float|null
$purchaseOrders  : Collection
$quantity  : int|null
$retail_price  : float|null
$saleProductStocks  : Collection
$status  : string|null
$status_en_stock  : bool|null
$supplier  : Supplier|null
$unit_of_measurement  : string|null
$updated_at  : DateTimeImmutable|null
$warehouse_stock  : int|null

Methods

__construct()  : mixed
addCart()  : static
addHistoryPurchaseOrder()  : static
addInventoryProduct()  : static
addProductVariant()  : static
addPurchaseOrder()  : static
addSaleProductStock()  : static
getAlertThresholdSale()  : int|null
getAlertThresholdWarehouse()  : int|null
getApprovalCertificate()  : string|null
getBarcode()  : string|null
getBulkPrice()  : float|null
getCarts()  : Collection<int, Cart>
getCategory()  : Category|null
getCertificateOrigin()  : string|null
getCreatedAt()  : DateTimeImmutable|null
getDescription()  : string|null
getExpirationDate()  : DateTimeInterface|null
getHistoryPurchaseOrders()  : Collection<int, HistoryPurchaseOrder>
getId()  : int|null
getImage()  : string|null
getInventoryProducts()  : Collection<int, InventoryProduct>
getInvoicePurchase()  : string|null
getManufacturingDate()  : DateTimeInterface|null
getName()  : string|null
getPointOfSaleId()  : int|null
getProductVariants()  : Collection<int, ProductVariant>
getPurchaseDate()  : DateTimeInterface|null
getPurchaseOrders()  : Collection<int, PurchaseOrder>
getPurchasePrice()  : float|null
getQuantity()  : int|null
getRetailPrice()  : float|null
getSaleProductStocks()  : Collection<int, SaleProductStock>
getStatus()  : string|null
getSupplier()  : Supplier|null
getUnitOfMeasurement()  : string|null
getUpdatedAt()  : DateTimeImmutable|null
getWarehouseStock()  : int|null
isArchiveStatus()  : bool|null
isIsRawMaterial()  : bool|null
isStatusEnStock()  : bool|null
removeCart()  : static
removeHistoryPurchaseOrder()  : static
removeInventoryProduct()  : static
removeProductVariant()  : static
removePurchaseOrder()  : static
removeSaleProductStock()  : static
setAlertThresholdSale()  : static
setAlertThresholdWarehouse()  : static
setApprovalCertificate()  : static
setArchiveStatus()  : static
setBarcode()  : static
setBulkPrice()  : static
setCategory()  : static
setCertificateOrigin()  : static
setCreatedAt()  : static
setDescription()  : static
setExpirationDate()  : static
setImage()  : static
setInvoicePurchase()  : static
setIsRawMaterial()  : static
setManufacturingDate()  : static
setName()  : static
setPointOfSaleId()  : static
setPurchaseDate()  : static
setPurchasePrice()  : static
setQuantity()  : static
setRetailPrice()  : static
setStatus()  : static
setStatusEnStock()  : static
setSupplier()  : static
setUnitOfMeasurement()  : static
setUpdatedAt()  : static
setWarehouseStock()  : static
toArray()  : array<string|int, mixed>

Constants

INACTIF

public mixed INACTIF = "INACTIF"

Properties

$currentAlertType

public string|null $currentAlertType = null

Property used temporarily for email alerts (not persisted)

$alert_threshold_sale

private int|null $alert_threshold_sale = null
Attributes
#[Column]
$nullable: true

$alert_threshold_warehouse

private int|null $alert_threshold_warehouse = null
Attributes
#[Column]
$nullable: true

$approval_certificate

private string|null $approval_certificate = null
Attributes
#[Column]
$nullable: true

$archive_status

private bool|null $archive_status = null
Attributes
#[Column]

$barcode

private string|null $barcode = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['product:read']

$bulk_price

private float|null $bulk_price = null
Attributes
#[Column]
$nullable: true
#[Groups]
['session:read']

$carts

private Collection $carts
Attributes
#[OneToMany]
$mappedBy: 'product'
$targetEntity: \App\Entity\Cart::class

$category

private Category|null $category = null
Attributes
#[Groups]
['product:read', 'product:write']
#[JoinColumn]
$nullable: false
#[ManyToOne]
$inversedBy: 'products'

$certificate_origin

private string|null $certificate_origin = null
Attributes
#[Column]
$nullable: true

$created_at

private DateTimeImmutable|null $created_at = null
Attributes
#[Column]

$description

private string|null $description = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::TEXT
$nullable: true

$expiration_date

private DateTimeInterface|null $expiration_date = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE
$nullable: true

$historyPurchaseOrders

private Collection $historyPurchaseOrders
Attributes
#[OneToMany]
$mappedBy: 'product'
$targetEntity: \App\Entity\HistoryPurchaseOrder::class

$id

private int|null $id = null
Attributes
#[Column]
#[GeneratedValue]
#[Groups]
['product:read', 'session:read']
#[Id]

$image

private string|null $image = null
Attributes
#[Column]
$length: 255
$nullable: true
#[Groups]
['product:read']

$inventoryProducts

private Collection $inventoryProducts
Attributes
#[OneToMany]
$mappedBy: 'product'
$targetEntity: \App\Entity\InventoryProduct::class

$invoice_purchase

private string|null $invoice_purchase = null
Attributes
#[Column]
$nullable: true

$isRawMaterial

private bool|null $isRawMaterial = null
Attributes
#[Column]

$manufacturing_date

private DateTimeInterface|null $manufacturing_date = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::DATE_MUTABLE
$nullable: true

$name

private string|null $name = null
Attributes
#[Column]
$length: 255
#[Groups]
['product:read', 'session:read']

$pointOfSaleId

private int|null $pointOfSaleId = null
Attributes
#[Column]

$productVariants

private Collection $productVariants
Attributes
#[OneToMany]
$mappedBy: 'product'
$targetEntity: \App\Entity\ProductVariant::class
$cascade: ['persist']
$orphanRemoval: true

$purchase_date

private DateTimeInterface|null $purchase_date = null
Attributes
#[Column]
$type: \Doctrine\DBAL\Types\Types::DATETIME_MUTABLE
$nullable: true

$purchase_price

private float|null $purchase_price = null
Attributes
#[Column]
$nullable: true
#[Groups]
['session:read']

$purchaseOrders

private Collection $purchaseOrders
Attributes
#[OneToMany]
$mappedBy: 'product'
$targetEntity: \App\Entity\PurchaseOrder::class

$quantity

private int|null $quantity = null
Attributes
#[Column]
#[Groups]
['product:read', 'product:update', 'session:read']

$retail_price

private float|null $retail_price = null
Attributes
#[Column]
$nullable: true
#[Groups]
['product:read', 'session:read']

$saleProductStocks

private Collection $saleProductStocks
Attributes
#[OneToMany]
$mappedBy: 'product'
$targetEntity: \App\Entity\SaleProductStock::class
$cascade: ['persist']

$status

private string|null $status = null
Attributes
#[Column]
$length: 255
$nullable: true

$status_en_stock

private bool|null $status_en_stock = null
Attributes
#[Column]

$supplier

private Supplier|null $supplier = null
Attributes
#[ManyToOne]
$inversedBy: 'products'

$unit_of_measurement

private string|null $unit_of_measurement = null
Attributes
#[Column]
$length: 255
$nullable: true

$updated_at

private DateTimeImmutable|null $updated_at = null
Attributes
#[Column]

$warehouse_stock

private int|null $warehouse_stock = null
Attributes
#[Column]
$nullable: true

Methods

__construct()

public __construct() : mixed

addCart()

public addCart(Cart $cart) : static
Parameters
$cart : Cart
Return values
static

getAlertThresholdSale()

public getAlertThresholdSale() : int|null
Return values
int|null

getAlertThresholdWarehouse()

public getAlertThresholdWarehouse() : int|null
Return values
int|null

getApprovalCertificate()

public getApprovalCertificate() : string|null
Return values
string|null

getBarcode()

public getBarcode() : string|null
Return values
string|null

getBulkPrice()

public getBulkPrice() : float|null
Return values
float|null

getCarts()

public getCarts() : Collection<int, Cart>
Return values
Collection<int, Cart>

getCertificateOrigin()

public getCertificateOrigin() : string|null
Return values
string|null

getCreatedAt()

public getCreatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getDescription()

public getDescription() : string|null
Return values
string|null

getExpirationDate()

public getExpirationDate() : DateTimeInterface|null
Return values
DateTimeInterface|null

getId()

public getId() : int|null
Return values
int|null

getImage()

public getImage() : string|null
Return values
string|null

getInvoicePurchase()

public getInvoicePurchase() : string|null
Return values
string|null

getManufacturingDate()

public getManufacturingDate() : DateTimeInterface|null
Return values
DateTimeInterface|null

getName()

public getName() : string|null
Return values
string|null

getPointOfSaleId()

public getPointOfSaleId() : int|null
Return values
int|null

getPurchaseDate()

public getPurchaseDate() : DateTimeInterface|null
Return values
DateTimeInterface|null

getPurchasePrice()

public getPurchasePrice() : float|null
Return values
float|null

getQuantity()

public getQuantity() : int|null
Return values
int|null

getRetailPrice()

public getRetailPrice() : float|null
Return values
float|null

getStatus()

public getStatus() : string|null
Return values
string|null

getUnitOfMeasurement()

public getUnitOfMeasurement() : string|null
Return values
string|null

getUpdatedAt()

public getUpdatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getWarehouseStock()

public getWarehouseStock() : int|null
Return values
int|null

isArchiveStatus()

public isArchiveStatus() : bool|null
Return values
bool|null

isIsRawMaterial()

public isIsRawMaterial() : bool|null
Return values
bool|null

isStatusEnStock()

public isStatusEnStock() : bool|null
Return values
bool|null

removeCart()

public removeCart(Cart $cart) : static
Parameters
$cart : Cart
Return values
static

setAlertThresholdSale()

public setAlertThresholdSale(int|null $alert_threshold_sale) : static
Parameters
$alert_threshold_sale : int|null
Return values
static

setAlertThresholdWarehouse()

public setAlertThresholdWarehouse(int|null $alert_threshold_warehouse) : static
Parameters
$alert_threshold_warehouse : int|null
Return values
static

setApprovalCertificate()

public setApprovalCertificate(string|null $approval_certificate) : static
Parameters
$approval_certificate : string|null
Return values
static

setArchiveStatus()

public setArchiveStatus(bool $archive_status) : static
Parameters
$archive_status : bool
Return values
static

setBarcode()

public setBarcode(string|null $barcode) : static
Parameters
$barcode : string|null
Return values
static

setBulkPrice()

public setBulkPrice(float|null $bulk_price) : static
Parameters
$bulk_price : float|null
Return values
static

setCategory()

public setCategory(Category|null $category) : static
Parameters
$category : Category|null
Return values
static

setCertificateOrigin()

public setCertificateOrigin(string|null $certificate_origin) : static
Parameters
$certificate_origin : string|null
Return values
static

setCreatedAt()

public setCreatedAt(DateTimeImmutable|null $created_at) : static
Parameters
$created_at : DateTimeImmutable|null
Return values
static

setDescription()

public setDescription(string|null $description) : static
Parameters
$description : string|null
Return values
static

setExpirationDate()

public setExpirationDate(DateTimeInterface|null $expiration_date) : static
Parameters
$expiration_date : DateTimeInterface|null
Return values
static

setImage()

public setImage(string|null $image) : static
Parameters
$image : string|null
Return values
static

setInvoicePurchase()

public setInvoicePurchase(string|null $invoice_purchase) : static
Parameters
$invoice_purchase : string|null
Return values
static

setIsRawMaterial()

public setIsRawMaterial(bool $isRawMaterial) : static
Parameters
$isRawMaterial : bool
Return values
static

setManufacturingDate()

public setManufacturingDate(DateTimeInterface|null $manufacturing_date) : static
Parameters
$manufacturing_date : DateTimeInterface|null
Return values
static

setName()

public setName(string $name) : static
Parameters
$name : string
Return values
static

setPointOfSaleId()

public setPointOfSaleId(int $pointOfSale) : static
Parameters
$pointOfSale : int
Return values
static

setPurchaseDate()

public setPurchaseDate(DateTimeInterface|null $purchase_date) : static
Parameters
$purchase_date : DateTimeInterface|null
Return values
static

setPurchasePrice()

public setPurchasePrice(float $purchase_price) : static
Parameters
$purchase_price : float
Return values
static

setQuantity()

public setQuantity(int $quantity) : static
Parameters
$quantity : int
Return values
static

setRetailPrice()

public setRetailPrice(float|null $retail_price) : static
Parameters
$retail_price : float|null
Return values
static

setStatus()

public setStatus(string|null $status) : static
Parameters
$status : string|null
Return values
static

setStatusEnStock()

public setStatusEnStock(bool $status_en_stock) : static
Parameters
$status_en_stock : bool
Return values
static

setSupplier()

public setSupplier(Supplier|null $supplier) : static
Parameters
$supplier : Supplier|null
Return values
static

setUnitOfMeasurement()

public setUnitOfMeasurement(string|null $unit_of_measurement) : static
Parameters
$unit_of_measurement : string|null
Return values
static

setUpdatedAt()

public setUpdatedAt(DateTimeImmutable $updated_at) : static
Parameters
$updated_at : DateTimeImmutable
Return values
static

setWarehouseStock()

public setWarehouseStock(int|null $warehouse_stock) : static
Parameters
$warehouse_stock : int|null
Return values
static

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>
On this page

Search results