Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into 15.0
This commit is contained in:
commit
240958ace6
@ -29,6 +29,7 @@
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage accounting accounts
|
* Class to manage accounting accounts
|
||||||
*/
|
*/
|
||||||
@ -566,7 +567,7 @@ class AccountingAccount extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Information on record
|
* Information on record
|
||||||
*
|
*
|
||||||
* @param int $id of record
|
* @param int $id ID of record
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function info($id)
|
public function info($id)
|
||||||
|
|||||||
@ -1734,6 +1734,8 @@ class Setup extends DolibarrApi
|
|||||||
{
|
{
|
||||||
$list = array();
|
$list = array();
|
||||||
|
|
||||||
|
$limit = 0;
|
||||||
|
|
||||||
$sql = "SELECT e.rowid, e.rowid as ref, e.label, e.address, e.zip, e.town, e.status";
|
$sql = "SELECT e.rowid, e.rowid as ref, e.label, e.address, e.zip, e.town, e.status";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."establishment as e";
|
$sql .= " FROM ".MAIN_DB_PREFIX."establishment as e";
|
||||||
$sql .= " WHERE e.entity IN (".getEntity('establishment').')';
|
$sql .= " WHERE e.entity IN (".getEntity('establishment').')';
|
||||||
|
|||||||
@ -359,11 +359,7 @@ class AssetType extends CommonObject
|
|||||||
if (!array_key_exists($obj->rowid, $ret)) {
|
if (!array_key_exists($obj->rowid, $ret)) {
|
||||||
if ($mode < 2) {
|
if ($mode < 2) {
|
||||||
$assetstatic = new Asset($this->db);
|
$assetstatic = new Asset($this->db);
|
||||||
if ($mode == 1) {
|
|
||||||
$assetstatic->fetch($obj->rowid, '', '', '', false, false);
|
|
||||||
} else {
|
|
||||||
$assetstatic->fetch($obj->rowid);
|
$assetstatic->fetch($obj->rowid);
|
||||||
}
|
|
||||||
$ret[$obj->rowid] = $assetstatic;
|
$ret[$obj->rowid] = $assetstatic;
|
||||||
} else {
|
} else {
|
||||||
$ret[$obj->rowid] = $obj->rowid;
|
$ret[$obj->rowid] = $obj->rowid;
|
||||||
|
|||||||
@ -5690,22 +5690,25 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete line in database
|
* Delete line in database
|
||||||
* TODO Add param User $user and notrigger (see skeleton)
|
|
||||||
*
|
*
|
||||||
|
* @param User $tmpuser User that deletes
|
||||||
|
* @param bool $notrigger false=launch triggers after, true=disable triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function delete()
|
public function delete($tmpuser = null, $notrigger = false)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
|
if (empty($notrigger)) {
|
||||||
$result = $this->call_trigger('LINEBILL_DELETE', $user);
|
$result = $this->call_trigger('LINEBILL_DELETE', $user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// End call triggers
|
// End call triggers
|
||||||
|
|
||||||
// extrafields
|
// extrafields
|
||||||
@ -5716,7 +5719,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
}
|
}
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".((int) $this->rowid);
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".((int) $this->rowid);
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
|
||||||
if ($this->db->query($sql)) {
|
if ($this->db->query($sql)) {
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@ -278,11 +278,11 @@ class MailmanSpip
|
|||||||
if ($result) {
|
if ($result) {
|
||||||
if ($mydb->num_rows($result)) {
|
if ($mydb->num_rows($result)) {
|
||||||
// nous avons au moins une reponse
|
// nous avons au moins une reponse
|
||||||
$mydb->close($result);
|
$mydb->close();
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
// nous n'avons pas de reponse => n'existe pas
|
// nous n'avons pas de reponse => n'existe pas
|
||||||
$mydb->close($result);
|
$mydb->close();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user