dolibarr  16.0.5
Functions
margins.lib.php File Reference

Library for common margin functions. More...

Go to the source code of this file.

Functions

 marges_admin_prepare_head ()
 Define head array for tabs of marges tools setup pages. More...
 
 marges_prepare_head ()
 Return array of tabs to used on pages for third parties cards. More...
 
 getMarginInfos ($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localtax2_tx, $fk_pa, $paht)
 Return an array with margins information of a line. More...
 

Detailed Description

Library for common margin functions.

Definition in file margins.lib.php.

Function Documentation

◆ getMarginInfos()

getMarginInfos (   $pvht,
  $remise_percent,
  $tva_tx,
  $localtax1_tx,
  $localtax2_tx,
  $fk_pa,
  $paht 
)

Return an array with margins information of a line.

Parameters
float$pvhtSelling price without tax
float$remise_percentDiscount percent on line
float$tva_txVat rate (not used)
float$localtax1_txVat rate special 1 (not used)
float$localtax2_txVat rate special 2 (not used)
int$fk_paId of buying price (prefer set this to 0 and provide $paht instead. With id, buying price may have change)
float$pahtBuying price without tax
Returns
array Array of margin info (buying price, marge rate, marque rate)

Definition at line 117 of file margins.lib.php.

◆ marges_admin_prepare_head()

marges_admin_prepare_head ( )

Define head array for tabs of marges tools setup pages.

Returns
Array of head

Definition at line 31 of file margins.lib.php.

◆ marges_prepare_head()

marges_prepare_head ( )

Return array of tabs to used on pages for third parties cards.

Returns
array Array of tabs

Definition at line 59 of file margins.lib.php.