Documentation du code de SPIP et de ses plugins

Commandes

Prix

Table of Contents

Functions

prix_commande_ht_dist()  : float
Permet d'obtenir le prix HT d'une commande.
prix_commande_dist()  : float
Permet d'obtenir le prix final TTC d'une commande
prix_commandes_detail_ht_dist()  : float
Permet d'obtenir le prix HT d'un détail d'une commande.
prix_commandes_detail_dist()  : float
Permet d'obtenir le prix final TTC d'un détail d'une commande

Functions

prix_commande_ht_dist()

Permet d'obtenir le prix HT d'une commande.

prix_commande_ht_dist(int $id_commande) : float

Prix HT = total HT de ses détails

Parameters
$id_commande : int

Identifiant de la commande

Return values
float

Retourne le prix HT de la commande sinon 0

prix_commande_dist()

Permet d'obtenir le prix final TTC d'une commande

prix_commande_dist(int $id_commande[, float $prix_ht = null ]) : float

Prix TTC = total TTC de ses détails

Parameters
$id_commande : int

Identifiant de la commande

$prix_ht : float = null

Prix HT de la commande, si null, on le calcule automatiquement

Return values
float

Retourne le prix TTC de la commande sinon 0

prix_commandes_detail_ht_dist()

Permet d'obtenir le prix HT d'un détail d'une commande.

prix_commandes_detail_ht_dist(int $id_commandes_detail, array<string|int, mixed> $ligne) : float

C'est le résultat de cette fonction qui est utilisée pour calculer le prix TTC. Prix HT = quantité * prix unitaire HT

Parameters
$id_commandes_detail : int

Identifiant du détail (paramètre inutilisé)

$ligne : array<string|int, mixed>

Couples champs / valeurs décrivant le détail Il faut au moins $ligne['quantite'] et $ligne['prix_unitaire_ht']

Return values
float

Retourne le prix HT du détail sinon 0

prix_commandes_detail_dist()

Permet d'obtenir le prix final TTC d'un détail d'une commande

prix_commandes_detail_dist(int $id_commandes_detail, float $prix_ht) : float

Prix TTC = prix HT + (prix HT * taxe)

Parameters
$id_commandes_detail : int

Identifiant du détail

$prix_ht : float

Prix HT du détail

Return values
float

Retourne le prix TTC du détail sinon 0


        
On this page

Search results