Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5f1a1e62e6
@ -4230,19 +4230,6 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// Free discount linked to invoice line
|
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
|
||||||
$sql .= ' SET fk_facture_line = NULL';
|
|
||||||
$sql .= ' WHERE fk_facture_line = '.((int) $rowid);
|
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::deleteline", LOG_DEBUG);
|
|
||||||
$result = $this->db->query($sql);
|
|
||||||
if (!$result) {
|
|
||||||
$this->error = $this->db->error();
|
|
||||||
$this->db->rollback();
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Memorize previous line for triggers
|
// Memorize previous line for triggers
|
||||||
$staticline = clone $line;
|
$staticline = clone $line;
|
||||||
$line->oldline = $staticline;
|
$line->oldline = $staticline;
|
||||||
@ -6444,13 +6431,38 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".((int) $this->rowid);
|
// Free discount linked to invoice line
|
||||||
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
||||||
|
$sql .= ' SET fk_facture_line = NULL';
|
||||||
|
$sql .= ' WHERE fk_facture_line = '.((int) $this->id);
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::deleteline", LOG_DEBUG);
|
||||||
|
$result = $this->db->query($sql);
|
||||||
|
if (!$result) {
|
||||||
|
$this->error = $this->db->error();
|
||||||
|
$this->errors[] = $this->error;
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'projet_task_time';
|
||||||
|
$sql .= ' SET invoice_id = NULL, invoice_line_id = NULL';
|
||||||
|
$sql .= ' WHERE invoice_line_id = '.((int) $this->id);
|
||||||
|
if (!$this->db->query($sql)) {
|
||||||
|
$this->error = $this->db->error()." sql=".$sql;
|
||||||
|
$this->errors[] = $this->error;
|
||||||
|
$this->db->rollback();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".((int) $this->id);
|
||||||
|
|
||||||
if ($this->db->query($sql)) {
|
if ($this->db->query($sql)) {
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->error()." sql=".$sql;
|
$this->error = $this->db->error()." sql=".$sql;
|
||||||
|
$this->errors[] = $this->error;
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -368,6 +368,8 @@ class MouvementStock extends CommonObject
|
|||||||
}
|
}
|
||||||
} else { // If not found, we add record
|
} else { // If not found, we add record
|
||||||
$productlot = new Productlot($this->db);
|
$productlot = new Productlot($this->db);
|
||||||
|
$productlot->origin = !empty($this->origin) ? (empty($this->origin->origin_type) ? $this->origin->element : $this->origin->origin_type) : '';
|
||||||
|
$productlot->origin_id = !empty($this->origin) ? $this->origin->id : 0;
|
||||||
$productlot->entity = $conf->entity;
|
$productlot->entity = $conf->entity;
|
||||||
$productlot->fk_product = $fk_product;
|
$productlot->fk_product = $fk_product;
|
||||||
$productlot->batch = $batch;
|
$productlot->batch = $batch;
|
||||||
|
|||||||
@ -192,6 +192,8 @@ foreach ($object->fields as $key => $val) {
|
|||||||
|
|
||||||
// Add name object fields to "search in all"
|
// Add name object fields to "search in all"
|
||||||
$fieldstosearchall['s.nom'] = "ThirdPartyName";
|
$fieldstosearchall['s.nom'] = "ThirdPartyName";
|
||||||
|
$fieldstosearchall['s.name_alias'] = "AliasNameShort";
|
||||||
|
$fieldstosearchall['s.code_client'] = "CustomerCode";
|
||||||
|
|
||||||
// Definition of array of fields for columns
|
// Definition of array of fields for columns
|
||||||
$arrayfields = array();
|
$arrayfields = array();
|
||||||
|
|||||||
@ -218,6 +218,9 @@ include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formticket = new FormTicket($db);
|
$formticket = new FormTicket($db);
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('ticketpublicview', 'globalcard'));
|
||||||
|
|
||||||
if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) {
|
if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) {
|
||||||
print '<div class="error">'.$langs->trans('TicketPublicInterfaceForbidden').'</div>';
|
print '<div class="error">'.$langs->trans('TicketPublicInterfaceForbidden').'</div>';
|
||||||
$db->close();
|
$db->close();
|
||||||
@ -332,6 +335,9 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a
|
|||||||
print ($object->dao->progress > 0 ? dol_escape_htmltag($object->dao->progress) : '0').'%';
|
print ($object->dao->progress > 0 ? dol_escape_htmltag($object->dao->progress) : '0').'%';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Other attributes
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user