mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Improving Contrat documentation and fixed some properties usage
This commit is contained in:
@@ -89,11 +89,38 @@ class Contrat extends CommonObject
|
|||||||
var $product;
|
var $product;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* TODO: Which is the correct one?
|
||||||
* Author of the contract
|
* Author of the contract
|
||||||
* @var
|
* @var
|
||||||
*/
|
*/
|
||||||
var $user_author;
|
var $user_author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: Which is the correct one?
|
||||||
|
* Author of the contract
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
|
public $user_creation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: Which is the correct one?
|
||||||
|
* Author of the contract
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $fk_user_author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: Which is the correct one?
|
||||||
|
* Author of the contract
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $user_author_id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
|
public $user_cloture;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date of creation
|
* Date of creation
|
||||||
* @var int
|
* @var int
|
||||||
@@ -101,7 +128,14 @@ class Contrat extends CommonObject
|
|||||||
var $date_creation;
|
var $date_creation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Date of last update
|
* Date of last modification
|
||||||
|
* Not filled until you call ->info()
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
public $date_modification;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Date of validation
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
var $date_validation;
|
var $date_validation;
|
||||||
@@ -1952,7 +1986,6 @@ class Contrat extends CommonObject
|
|||||||
while ($xnbp < $nbp)
|
while ($xnbp < $nbp)
|
||||||
{
|
{
|
||||||
$line=new ContratLigne($this->db);
|
$line=new ContratLigne($this->db);
|
||||||
$line->desc=$langs->trans("Description")." ".$xnbp;
|
|
||||||
$line->qty=1;
|
$line->qty=1;
|
||||||
$line->subprice=100;
|
$line->subprice=100;
|
||||||
$line->price=100;
|
$line->price=100;
|
||||||
@@ -2421,7 +2454,7 @@ class ContratLigne extends CommonObject
|
|||||||
$sql.= ",total_localtax1=".price2num($this->total_localtax1,'MT')."";
|
$sql.= ",total_localtax1=".price2num($this->total_localtax1,'MT')."";
|
||||||
$sql.= ",total_localtax2=".price2num($this->total_localtax2,'MT')."";
|
$sql.= ",total_localtax2=".price2num($this->total_localtax2,'MT')."";
|
||||||
$sql.= ",total_ttc=".price2num($this->total_ttc,'MT')."";
|
$sql.= ",total_ttc=".price2num($this->total_ttc,'MT')."";
|
||||||
$sql.= " WHERE rowid = ".$this->rowid;
|
$sql.= " WHERE rowid = ".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::update_total", LOG_DEBUG);
|
dol_syslog(get_class($this)."::update_total", LOG_DEBUG);
|
||||||
|
|
||||||
|
|||||||
@@ -1523,7 +1523,7 @@ function migrate_price_contrat($db,$langs,$conf)
|
|||||||
// On met a jour les 3 nouveaux champs
|
// On met a jour les 3 nouveaux champs
|
||||||
$contratligne= new ContratLigne($db);
|
$contratligne= new ContratLigne($db);
|
||||||
//$contratligne->fetch($rowid); Non requis car le update_total ne met a jour que chp redefinis
|
//$contratligne->fetch($rowid); Non requis car le update_total ne met a jour que chp redefinis
|
||||||
$contratligne->rowid=$rowid;
|
$contratligne->id=$rowid;
|
||||||
|
|
||||||
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,0,'HT',$info_bits,0,$tmpmysoc);
|
$result=calcul_price_total($qty,$pu,$remise_percent,$txtva,0,0,0,'HT',$info_bits,0,$tmpmysoc);
|
||||||
$total_ht = $result[0];
|
$total_ht = $result[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user