dolibarr 21.0.0-beta
FormMargin Class Reference

Class permettant la generation de composants html autre Only common components are here. More...

Public Member Functions

 __construct ($db)
 Constructor.
 
 getMarginInfosArray ($object, $force_price=false)
 get array with margin information from lines of object TODO Move this in common class.
 
 displayMarginInfos ($object, $force_price=false)
 Show the array with all margin infos.
 

Detailed Description

Class permettant la generation de composants html autre Only common components are here.

Definition at line 31 of file html.formmargin.class.php.

Constructor & Destructor Documentation

◆ __construct()

FormMargin::__construct ( $db)

Constructor.

Parameters
DoliDB$dbDatabase handler

Definition at line 49 of file html.formmargin.class.php.

Member Function Documentation

◆ displayMarginInfos()

FormMargin::displayMarginInfos ( $object,
$force_price = false )

Show the array with all margin infos.

Parameters
CommonObject$objectObject we want to get margin information for
boolean$force_priceForce price
Returns
void

Definition at line 216 of file html.formmargin.class.php.

References $object, getDolGlobalString(), getMarginInfosArray(), img_picto(), price(), and setEventMessages().

◆ getMarginInfosArray()

FormMargin::getMarginInfosArray ( $object,
$force_price = false )

get array with margin information from lines of object TODO Move this in common class.

Parameters
CommonObject$objectObject we want to get margin information for
bool$force_priceTrue of not
Returns
array{pa_products:float,pv_products:float, margin_on_products:float, margin_rate_products :string, mark_rate_products :string, pa_services:float, pv_services:float, margin_on_services:float, margin_rate_services :string, mark_rate_services :string, pa_total:float, pv_total:float, total_margin:float, total_margin_rate :string, total_mark_rate :string} Array with info

Definition at line 64 of file html.formmargin.class.php.

References $conf, $object, getDolGlobalInt(), and getDolGlobalString().

Referenced by displayMarginInfos().


The documentation for this class was generated from the following file: