dolibarr-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dolibarr-dev] Question about Contrat::update_statut()


From: Marcos García
Subject: [Dolibarr-dev] Question about Contrat::update_statut()
Date: Sun, 28 Dec 2014 19:35:28 +0100

Hi all:

This function looks so weird to me. It seems that it just returns 1 but it is used around Dolibarr:

Contrat::adline
Contrat::updateline
ContratLigne::update
ContratTest::testContratValid

Is it supposed to do something or should it be removed?

/**
* Update statut of contract according to services
*
* @param User $user Object user
* @return int <0 if KO, >0 if OK
*/
function update_statut($user)
{
// If draft, we keep it (should not happen)
if ($this->statut == 0) return 1;

// Load $this->lines array
// $this->fetch_lines();

$newstatut=1;
foreach($this->lines as $key => $contractline)
{
// if ($contractline) // Loop on each service
}

return 1;
}
Regards,
 
Marcos García
address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]