mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 19:02:35 +01:00
Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -502,11 +502,11 @@ if ($action == 'edit') {
|
||||
print '</td><td>';
|
||||
// SuperAdministrator access only
|
||||
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
|
||||
print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW" size="32" value="'.$mainsmtppw.'" autocomplete="off">';
|
||||
print '<input class="flat" type="password" name="MAIN_MAIL_SMTPS_PW" size="32" value="' . htmlspecialchars($mainsmtppw, ENT_COMPAT, 'UTF-8') . '" autocomplete="off">';
|
||||
} else {
|
||||
$htmltext = $langs->trans("ContactSuperAdminForChange");
|
||||
print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW, $htmltext, 1, 'superadmin');
|
||||
print '<input type="hidden" name="MAIN_MAIL_SMTPS_PW" value="'.$mainsmtppw.'">';
|
||||
print '<input type="hidden" name="MAIN_MAIL_SMTPS_PW" value="' . htmlspecialchars($mainsmtppw, ENT_COMPAT, 'UTF-8') . '">';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS'))) {
|
||||
if (GETPOST($qty, 'int') > 0 || getDolGlobalString('SHIPMENT_GETS_ALL_ORDER_PRODUCTS')) {
|
||||
$ent = "entl".$i;
|
||||
$idl = "idl".$i;
|
||||
$entrepot_id = is_numeric(GETPOST($ent, 'int')) ?GETPOST($ent, 'int') : GETPOST('entrepot_id', 'int');
|
||||
@@ -388,7 +388,7 @@ if (empty($reshook)) {
|
||||
$entrepot_id = 0;
|
||||
}
|
||||
|
||||
$ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), GETPOSTINT($qty), $array_options[$i]);
|
||||
$ret = $object->addline($entrepot_id, GETPOST($idl, 'int'), price2num(GETPOST($qty, 'alpha'), 'MS'), $array_options[$i]);
|
||||
if ($ret < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
|
||||
@@ -191,8 +191,6 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (20, '2010', '
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (20, '2011', 'Ideell förening');
|
||||
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle) VALUES (20, '2012', 'Stiftelse');
|
||||
|
||||
ALTER TABLE llx_c_holiday_types ADD COLUMN block_if_negative integer NOT NULL DEFAULT 0 AFTER fk_country;
|
||||
|
||||
|
||||
-- START GRH/HRM MODULE
|
||||
|
||||
|
||||
@@ -710,6 +710,7 @@ ALTER TABLE llx_c_email_templates ADD COLUMN email_tobcc varchar(255);
|
||||
|
||||
ALTER TABLE llx_fichinter ADD COLUMN ref_client varchar(255) after ref_ext;
|
||||
|
||||
ALTER TABLE llx_c_holiday_types ADD COLUMN block_if_negative integer NOT NULL DEFAULT 0 AFTER fk_country;
|
||||
ALTER TABLE llx_c_holiday_types ADD COLUMN sortorder smallint;
|
||||
|
||||
ALTER TABLE llx_expedition MODIFY COLUMN ref_customer varchar(255);
|
||||
|
||||
@@ -516,7 +516,7 @@ class Partnership extends CommonObject
|
||||
if (!empty($limit)) {
|
||||
$sql .= $this->db->plimit($limit, $offset);
|
||||
}
|
||||
print $sql;
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
||||
@@ -112,14 +112,14 @@ if (!empty($hookmanager->resPrint)) {
|
||||
<p class="left">
|
||||
<?php
|
||||
$constFreeText = 'TAKEPOS_HEADER'.$_SESSION['takeposterminal'];
|
||||
if (!empty($conf->global->TAKEPOS_HEADER) || !empty($conf->global->{$constFreeText})) {
|
||||
if (!empty($conf->global->TAKEPOS_HEADER) || getDolGlobalString($constFreeText)) {
|
||||
$newfreetext = '';
|
||||
$substitutionarray = getCommonSubstitutionArray($langs);
|
||||
if (!empty($conf->global->TAKEPOS_HEADER)) {
|
||||
$newfreetext .= make_substitutions($conf->global->TAKEPOS_HEADER, $substitutionarray);
|
||||
}
|
||||
if (!empty($conf->global->{$constFreeText})) {
|
||||
$newfreetext .= make_substitutions($conf->global->{$constFreeText}, $substitutionarray);
|
||||
if (getDolGlobalString($constFreeText)) {
|
||||
$newfreetext .= make_substitutions(getDolGlobalString($constFreeText), $substitutionarray);
|
||||
}
|
||||
print nl2br($newfreetext);
|
||||
}
|
||||
@@ -137,12 +137,12 @@ if ($object->statut == Facture::STATUS_DRAFT) {
|
||||
print $object->ref;
|
||||
}
|
||||
if ($conf->global->TAKEPOS_SHOW_CUSTOMER) {
|
||||
if ($object->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}) {
|
||||
if ($object->socid != getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"])) {
|
||||
$soc = new Societe($db);
|
||||
if ($object->socid > 0) {
|
||||
$soc->fetch($object->socid);
|
||||
} else {
|
||||
$soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]});
|
||||
$soc->fetch(getDolGlobalInt('CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]));
|
||||
}
|
||||
print "<br>".$langs->trans("Customer").': '.$soc->name;
|
||||
}
|
||||
|
||||
@@ -459,7 +459,8 @@ class Ticket extends CommonObject
|
||||
*/
|
||||
public function create($user, $notrigger = 0)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf;
|
||||
|
||||
$error = 0;
|
||||
|
||||
// Clean parameters
|
||||
@@ -473,6 +474,8 @@ class Ticket extends CommonObject
|
||||
$result = $this->verify();
|
||||
|
||||
if ($result >= 0) {
|
||||
$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."ticket(";
|
||||
$sql .= "ref,";
|
||||
@@ -521,7 +524,7 @@ class Ticket extends CommonObject
|
||||
$sql .= " ".(!isset($this->datec) || dol_strlen($this->datec) == 0 ? 'NULL' : "'".$this->db->idate($this->datec)."'").",";
|
||||
$sql .= " ".(!isset($this->date_read) || dol_strlen($this->date_read) == 0 ? 'NULL' : "'".$this->db->idate($this->date_read)."'").",";
|
||||
$sql .= " ".(!isset($this->date_close) || dol_strlen($this->date_close) == 0 ? 'NULL' : "'".$this->db->idate($this->date_close)."'");
|
||||
$sql .= ", ".((int) $conf->entity);
|
||||
$sql .= ", ".((int) $this->entity);
|
||||
$sql .= ", ".(!isset($this->notify_tiers_at_create) ? '1' : "'".$this->db->escape($this->notify_tiers_at_create)."'");
|
||||
$sql .= ", ".(!isset($this->ip) ? 'NULL' : "'".$this->db->escape($this->ip)."'");
|
||||
$sql .= ")";
|
||||
|
||||
Reference in New Issue
Block a user