forked from Wavyzz/dolibarr
Compare commits
74 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4601686a6 | ||
|
|
bcf6d6a7a2 | ||
|
|
e818bf732d | ||
|
|
e18c5b9d68 | ||
|
|
031acacdab | ||
|
|
18725aec6b | ||
|
|
f256deb54b | ||
|
|
7fa3474ecd | ||
|
|
fa05dc44ce | ||
|
|
5b9453e302 | ||
|
|
d81a2d060e | ||
|
|
97aaff7395 | ||
|
|
6f4b2a8905 | ||
|
|
e1c343cedd | ||
|
|
b67fdb3e51 | ||
|
|
ad60a50d4d | ||
|
|
08a976fd85 | ||
|
|
db47ce3bb1 | ||
|
|
04fed9526a | ||
|
|
5354b54ec0 | ||
|
|
42d8591758 | ||
|
|
abc1d1dcb3 | ||
|
|
628189f57f | ||
|
|
748dcd0881 | ||
|
|
7a7146c03d | ||
|
|
90c24b3d95 | ||
|
|
0912b3b04f | ||
|
|
2dd81deb13 | ||
|
|
273ec857a3 | ||
|
|
2519278269 | ||
|
|
74881ae251 | ||
|
|
a5f51dc969 | ||
|
|
04b7fdd4c4 | ||
|
|
5203652796 | ||
|
|
425c23d28c | ||
|
|
115323dec8 | ||
|
|
b8533e1853 | ||
|
|
753e5e535d | ||
|
|
a602309e04 | ||
|
|
f51935a258 | ||
|
|
fbca98ec2a | ||
|
|
93f23fe452 | ||
|
|
8a55e2f6a4 | ||
|
|
e0a3756c6e | ||
|
|
b3a2908b48 | ||
|
|
910f7e8564 | ||
|
|
7cf1a97673 | ||
|
|
cf57e7e88b | ||
|
|
a186e16568 | ||
|
|
793e77bc5f | ||
|
|
70a453a5c2 | ||
|
|
9509929f5d | ||
|
|
336d3ad8e5 | ||
|
|
e71631abe0 | ||
|
|
25ea797aed | ||
|
|
d0fb08adf4 | ||
|
|
624493fb26 | ||
|
|
6eddee9a78 | ||
|
|
52138372ce | ||
|
|
a27538f582 | ||
|
|
385927fe06 | ||
|
|
a621032643 | ||
|
|
32646cb7f4 | ||
|
|
74b67eb6c6 | ||
|
|
8a330ecaa9 | ||
|
|
eef0d0bddb | ||
|
|
c1889afd7b | ||
|
|
644f365455 | ||
|
|
667890247c | ||
|
|
c727bbb530 | ||
|
|
16a0d1d7d5 | ||
|
|
bb40a43c5f | ||
|
|
171494ddfc | ||
|
|
9f5ef68123 |
@@ -103,7 +103,9 @@ if ($action == "set") {
|
|||||||
if (!($res > 0)) {
|
if (!($res > 0)) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
} elseif (!$error) {
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -736,7 +736,50 @@ class Documents extends DolibarrApi
|
|||||||
throw new RestException(500, "Failed to open file '".$destfiletmp."' for write");
|
throw new RestException(500, "Failed to open file '".$destfiletmp."' for write");
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = dol_move($destfiletmp, $destfile, 0, $overwriteifexists, 1);
|
$disablevirusscan = 0;
|
||||||
|
$src_file = $destfiletmp;
|
||||||
|
$dest_file = $destfile;
|
||||||
|
|
||||||
|
// Security:
|
||||||
|
// If we need to make a virus scan
|
||||||
|
if (empty($disablevirusscan) && file_exists($src_file)) {
|
||||||
|
$checkvirusarray = dolCheckVirus($src_file);
|
||||||
|
if (count($checkvirusarray)) {
|
||||||
|
dol_syslog('Files.lib::dol_move_uploaded_file File "'.$src_file.'" (target name "'.$dest_file.'") KO with antivirus: errors='.join(',', $checkvirusarray), LOG_WARNING);
|
||||||
|
throw new RestException(500, 'ErrorFileIsInfectedWithAVirus: '.join(',', $checkvirusarray));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Security:
|
||||||
|
// Disallow file with some extensions. We rename them.
|
||||||
|
// Because if we put the documents directory into a directory inside web root (very bad), this allows to execute on demand arbitrary code.
|
||||||
|
if (isAFileWithExecutableContent($dest_file) && empty($conf->global->MAIN_DOCUMENT_IS_OUTSIDE_WEBROOT_SO_NOEXE_NOT_REQUIRED)) {
|
||||||
|
// $upload_dir ends with a slash, so be must be sure the medias dir to compare to ends with slash too.
|
||||||
|
$publicmediasdirwithslash = $conf->medias->multidir_output[$conf->entity];
|
||||||
|
if (!preg_match('/\/$/', $publicmediasdirwithslash)) {
|
||||||
|
$publicmediasdirwithslash .= '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strpos($upload_dir, $publicmediasdirwithslash) !== 0 || !getDolGlobalInt("MAIN_DOCUMENT_DISABLE_NOEXE_IN_MEDIAS_DIR")) { // We never add .noexe on files into media directory
|
||||||
|
$dest_file .= '.noexe';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Security:
|
||||||
|
// We refuse cache files/dirs, upload using .. and pipes into filenames.
|
||||||
|
if (preg_match('/^\./', basename($src_file)) || preg_match('/\.\./', $src_file) || preg_match('/[<>|]/', $src_file)) {
|
||||||
|
dol_syslog("Refused to deliver file ".$src_file, LOG_WARNING);
|
||||||
|
throw new RestException(500, "Refused to deliver file ".$src_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Security:
|
||||||
|
// We refuse cache files/dirs, upload using .. and pipes into filenames.
|
||||||
|
if (preg_match('/^\./', basename($dest_file)) || preg_match('/\.\./', $dest_file) || preg_match('/[<>|]/', $dest_file)) {
|
||||||
|
dol_syslog("Refused to deliver file ".$dest_file, LOG_WARNING);
|
||||||
|
throw new RestException(500, "Refused to deliver file ".$dest_file);
|
||||||
|
}
|
||||||
|
|
||||||
|
$result = dol_move($destfiletmp, $dest_file, 0, $overwriteifexists, 1, 1);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
throw new RestException(500, "Failed to move file into '".$destfile."'");
|
throw new RestException(500, "Failed to move file into '".$destfile."'");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -986,7 +986,7 @@ class BOM extends CommonObject
|
|||||||
$outputlangs->load("products");
|
$outputlangs->load("products");
|
||||||
|
|
||||||
if (!dol_strlen($modele)) {
|
if (!dol_strlen($modele)) {
|
||||||
$modele = 'standard';
|
$modele = '';
|
||||||
|
|
||||||
if ($this->model_pdf) {
|
if ($this->model_pdf) {
|
||||||
$modele = $this->model_pdf;
|
$modele = $this->model_pdf;
|
||||||
|
|||||||
@@ -1233,8 +1233,14 @@ if ($action == 'create') {
|
|||||||
$preselectedids[GETPOST('contactid', 'int')] = GETPOST('contactid', 'int');
|
$preselectedids[GETPOST('contactid', 'int')] = GETPOST('contactid', 'int');
|
||||||
}
|
}
|
||||||
if ($origin=='contact') $preselectedids[GETPOST('originid', 'int')] = GETPOST('originid', 'int');
|
if ($origin=='contact') $preselectedids[GETPOST('originid', 'int')] = GETPOST('originid', 'int');
|
||||||
|
// select "all" or "none" contact by default
|
||||||
|
if (getDolGlobalInt('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT')) {
|
||||||
|
$select_contact_default = 0; // select "all" contacts by default : avoid to use it if there is a lot of contacts
|
||||||
|
} else {
|
||||||
|
$select_contact_default = -1; // select "none" by default
|
||||||
|
}
|
||||||
print img_picto('', 'contact', 'class="paddingrightonly"');
|
print img_picto('', 'contact', 'class="paddingrightonly"');
|
||||||
print $form->selectcontacts(GETPOST('socid', 'int'), $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 quatrevingtpercent', false, 0, array(), false, 'multiple', 'contactid');
|
print $form->selectcontacts(GETPOSTISSET('socid') ? GETPOSTINT('socid') : $select_contact_default, $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'minwidth300 quatrevingtpercent', false, 0, array(), false, 'multiple', 'contactid');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1728,7 +1734,12 @@ if ($id > 0) {
|
|||||||
// related contact
|
// related contact
|
||||||
print '<tr><td>'.$langs->trans("ActionOnContact").'</td><td>';
|
print '<tr><td>'.$langs->trans("ActionOnContact").'</td><td>';
|
||||||
print '<div class="maxwidth200onsmartphone">';
|
print '<div class="maxwidth200onsmartphone">';
|
||||||
print img_picto('', 'contact', 'class="paddingrightonly"').$form->selectcontacts($object->socid, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'quatrevingtpercent', false, 0, 0, array(), 'multiple', 'contactid');
|
if (getDolGlobalInt('MAIN_ACTIONCOM_CAN_ADD_ANY_CONTACT')) {
|
||||||
|
$select_contact_default = 0; // select "all" contacts by default : avoid to use it if there is a lot of contacts
|
||||||
|
} else {
|
||||||
|
$select_contact_default = -1; // select "none" by default
|
||||||
|
}
|
||||||
|
print img_picto('', 'contact', 'class="paddingrightonly"').$form->selectcontacts(!empty($object->socid) ? $object->socid : $select_contact_default, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'quatrevingtpercent', false, 0, 0, array(), 'multiple', 'contactid');
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@@ -1215,11 +1215,16 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
if (!empty($this->socpeopleassigned)) {
|
if (!empty($this->socpeopleassigned)) {
|
||||||
$already_inserted = array();
|
$already_inserted = array();
|
||||||
foreach (array_keys($this->socpeopleassigned) as $id) {
|
foreach (array_keys($this->socpeopleassigned) as $key => $val) {
|
||||||
if (!empty($already_inserted[$val['id']])) continue;
|
if (!is_array($val)) { // For backward compatibility when val=id
|
||||||
|
$val = array('id' => $val);
|
||||||
|
}
|
||||||
|
if (!empty($already_inserted[$val['id']])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)";
|
||||||
$sql .= " VALUES(".((int) $this->id).", 'socpeople', ".((int) $id).", 0, 0, 0)";
|
$sql .= " VALUES(".((int) $this->id).", 'socpeople', ".((int) $val['id']).", 0, 0, 0)";
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
@@ -2352,6 +2357,7 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
// Load event
|
// Load event
|
||||||
$res = $this->fetch($actionCommReminder->fk_actioncomm);
|
$res = $this->fetch($actionCommReminder->fk_actioncomm);
|
||||||
|
if ($res > 0) $res = $this->fetch_thirdparty();
|
||||||
if ($res > 0) {
|
if ($res > 0) {
|
||||||
// PREPARE EMAIL
|
// PREPARE EMAIL
|
||||||
$errormesg = '';
|
$errormesg = '';
|
||||||
|
|||||||
@@ -1164,7 +1164,7 @@ class Commande extends CommonOrder
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dol_print_error($this->db);
|
$this->error = $this->db->lasterror();
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5116,7 +5116,9 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
while ($obj = $this->db->fetch_object($resql)) {
|
while ($obj = $this->db->fetch_object($resql)) {
|
||||||
if (!$error) {
|
// Create a loopError that is reset at each loop, this counter is added to the global counter at the end of loop
|
||||||
|
$loopError = 0;
|
||||||
|
|
||||||
// Load event
|
// Load event
|
||||||
$res = $tmpinvoice->fetch($obj->id);
|
$res = $tmpinvoice->fetch($obj->id);
|
||||||
if ($res > 0) {
|
if ($res > 0) {
|
||||||
@@ -5162,21 +5164,21 @@ class Facture extends CommonInvoice
|
|||||||
$to = $recipient->email;
|
$to = $recipient->email;
|
||||||
} else {
|
} else {
|
||||||
$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for user.";
|
$errormesg = "Failed to send remind to thirdparty id=".$tmpinvoice->socid.". No email defined for user.";
|
||||||
$error++;
|
$loopError++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->socid;
|
$errormesg = "Failed to load recipient with thirdparty id=".$tmpinvoice->socid;
|
||||||
$error++;
|
$loopError++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sender
|
// Sender
|
||||||
$from = $conf->global->MAIN_MAIL_EMAIL_FROM;
|
$from = $conf->global->MAIN_MAIL_EMAIL_FROM;
|
||||||
if (empty($from)) {
|
if (empty($from)) {
|
||||||
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
|
$errormesg = "Failed to get sender into global setup MAIN_MAIL_EMAIL_FROM";
|
||||||
$error++;
|
$loopError++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$loopError) {
|
||||||
// Errors Recipient
|
// Errors Recipient
|
||||||
$errors_to = $conf->global->MAIN_MAIL_ERRORS_TO;
|
$errors_to = $conf->global->MAIN_MAIL_ERRORS_TO;
|
||||||
|
|
||||||
@@ -5200,7 +5202,7 @@ class Facture extends CommonInvoice
|
|||||||
$nbMailSend++;
|
$nbMailSend++;
|
||||||
} else {
|
} else {
|
||||||
$errormesg = $cMailFile->error.' : '.$to;
|
$errormesg = $cMailFile->error.' : '.$to;
|
||||||
$error++;
|
$loopError++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5209,23 +5211,24 @@ class Facture extends CommonInvoice
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$errorsMsg[] = 'Failed to fetch record invoice with ID = '.$obj->id;
|
$errorsMsg[] = 'Failed to fetch record invoice with ID = '.$obj->id;
|
||||||
$error++;
|
$loopError++;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$error += $loopError;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if ($error > 0) { // If there is at least an error, early return with specific message
|
||||||
$this->output .= 'Nb of emails sent : '.$nbMailSend;
|
|
||||||
$this->db->commit();
|
|
||||||
return 0;
|
|
||||||
} else {
|
|
||||||
$this->db->commit(); // We commit also on error, to have the error message recorded.
|
$this->db->commit(); // We commit also on error, to have the error message recorded.
|
||||||
$this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error;
|
$this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error;
|
||||||
return $error;
|
return $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->output .= 'Nb of emails sent : '.$nbMailSend;
|
||||||
|
$this->db->commit();
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
|||||||
|
|
||||||
// Quantity
|
// Quantity
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print $qty[$key];
|
print price($qty[$key], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Percent;
|
// Percent;
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ class box_actions extends ModeleBoxes
|
|||||||
$sql .= " AND s.rowid = ".((int) $user->socid);
|
$sql .= " AND s.rowid = ".((int) $user->socid);
|
||||||
}
|
}
|
||||||
if (empty($user->rights->agenda->allactions->read)) {
|
if (empty($user->rights->agenda->allactions->read)) {
|
||||||
$sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id)." OR a.fk_user_done = ".((int) $user->id).")";
|
$sql .= " AND (a.fk_user_author = ".((int) $user->id)." OR a.fk_user_action = ".((int) $user->id).")";
|
||||||
}
|
}
|
||||||
$sql .= " ORDER BY a.datec DESC";
|
$sql .= " ORDER BY a.datec DESC";
|
||||||
$sql .= $this->db->plimit($max, 0);
|
$sql .= $this->db->plimit($max, 0);
|
||||||
|
|||||||
@@ -2060,7 +2060,9 @@ abstract class CommonObject
|
|||||||
$sql = "SELECT MAX(te.".$fieldid.")";
|
$sql = "SELECT MAX(te.".$fieldid.")";
|
||||||
$sql .= " FROM ".(empty($nodbprefix) ?MAIN_DB_PREFIX:'').$this->table_element." as te";
|
$sql .= " FROM ".(empty($nodbprefix) ?MAIN_DB_PREFIX:'').$this->table_element." as te";
|
||||||
if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||||
$sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug";
|
if (empty($user->admin) || !empty($user->entity) || $conf->entity != 1) {
|
||||||
|
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON ug.fk_user = te.rowid";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) {
|
if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) {
|
||||||
$tmparray = explode('@', $this->ismultientitymanaged);
|
$tmparray = explode('@', $this->ismultientitymanaged);
|
||||||
@@ -2097,7 +2099,6 @@ abstract class CommonObject
|
|||||||
if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) {
|
if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) {
|
||||||
$sql .= " AND te.entity IS NOT NULL"; // Show all users
|
$sql .= " AND te.entity IS NOT NULL"; // Show all users
|
||||||
} else {
|
} else {
|
||||||
$sql .= " AND ug.fk_user = te.rowid";
|
|
||||||
$sql .= " AND ug.entity IN (".getEntity('usergroup').")";
|
$sql .= " AND ug.entity IN (".getEntity('usergroup').")";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -2130,7 +2131,9 @@ abstract class CommonObject
|
|||||||
$sql = "SELECT MIN(te.".$fieldid.")";
|
$sql = "SELECT MIN(te.".$fieldid.")";
|
||||||
$sql .= " FROM ".(empty($nodbprefix) ?MAIN_DB_PREFIX:'').$this->table_element." as te";
|
$sql .= " FROM ".(empty($nodbprefix) ?MAIN_DB_PREFIX:'').$this->table_element." as te";
|
||||||
if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) {
|
||||||
$sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug";
|
if (empty($user->admin) || !empty($user->entity) || $conf->entity != 1) {
|
||||||
|
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."usergroup_user as ug ON ug.fk_user=te.rowid";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) {
|
if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) {
|
||||||
$tmparray = explode('@', $this->ismultientitymanaged);
|
$tmparray = explode('@', $this->ismultientitymanaged);
|
||||||
@@ -2167,7 +2170,6 @@ abstract class CommonObject
|
|||||||
if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) {
|
if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) {
|
||||||
$sql .= " AND te.entity IS NOT NULL"; // Show all users
|
$sql .= " AND te.entity IS NOT NULL"; // Show all users
|
||||||
} else {
|
} else {
|
||||||
$sql .= " AND ug.fk_user = te.rowid";
|
|
||||||
$sql .= " AND ug.entity IN (".getEntity('usergroup').")";
|
$sql .= " AND ug.entity IN (".getEntity('usergroup').")";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -3893,7 +3895,11 @@ abstract class CommonObject
|
|||||||
$module = 'adherent';
|
$module = 'adherent';
|
||||||
} elseif ($objecttype == 'contact') {
|
} elseif ($objecttype == 'contact') {
|
||||||
$module = 'societe';
|
$module = 'societe';
|
||||||
|
} elseif ($objecttype == 'action') {
|
||||||
|
$module = 'agenda';
|
||||||
|
$subelement = 'actionComm';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set classfile
|
// Set classfile
|
||||||
$classfile = strtolower($subelement);
|
$classfile = strtolower($subelement);
|
||||||
$classname = ucfirst($subelement);
|
$classname = ucfirst($subelement);
|
||||||
@@ -8042,7 +8048,7 @@ abstract class CommonObject
|
|||||||
$("#"+child_list).hide();
|
$("#"+child_list).hide();
|
||||||
//Show mother lists
|
//Show mother lists
|
||||||
} else if ($("#"+parent_list).val() != 0){
|
} else if ($("#"+parent_list).val() != 0){
|
||||||
$("#"+parent_list).show();
|
showOptions'.$type.'(child_list, parent_list, orig_select[child_list]);
|
||||||
}
|
}
|
||||||
//Show the child list if the parent list value is selected
|
//Show the child list if the parent list value is selected
|
||||||
$("select[name=\""+parent_list+"\"]").click(function() {
|
$("select[name=\""+parent_list+"\"]").click(function() {
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ class Utils
|
|||||||
} elseif ($compression == 'zstd') {
|
} elseif ($compression == 'zstd') {
|
||||||
fclose($handle);
|
fclose($handle);
|
||||||
}
|
}
|
||||||
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error
|
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg) || preg_match('/^\/\*M?!999999/', $errormsg)) { // Start of file is ok, NOT an error
|
||||||
$errormsg = '';
|
$errormsg = '';
|
||||||
} else {
|
} else {
|
||||||
// Renommer fichier sortie en fichier erreur
|
// Renommer fichier sortie en fichier erreur
|
||||||
|
|||||||
@@ -125,15 +125,13 @@ abstract class DoliDB implements Database
|
|||||||
*
|
*
|
||||||
* @param string $stringtosanitize String to escape
|
* @param string $stringtosanitize String to escape
|
||||||
* @param int $allowsimplequote 1=Allow simple quotes in string. When string is used as a list of SQL string ('aa', 'bb', ...)
|
* @param int $allowsimplequote 1=Allow simple quotes in string. When string is used as a list of SQL string ('aa', 'bb', ...)
|
||||||
|
* @param int $allowsequals 1=Allow equals sign
|
||||||
|
* @param int $allowsspace 1=Allow space char
|
||||||
* @return string String escaped
|
* @return string String escaped
|
||||||
*/
|
*/
|
||||||
public function sanitize($stringtosanitize, $allowsimplequote = 0)
|
public function sanitize($stringtosanitize, $allowsimplequote = 0, $allowsequals = 0, $allowsspace = 0)
|
||||||
{
|
{
|
||||||
if ($allowsimplequote) {
|
return preg_replace('/[^a-z0-9_\-\.,'.($allowsequals ? '=' : '').($allowsimplequote ? "\'" : '').($allowsspace ? ' ' : '').']/i', '', $stringtosanitize);
|
||||||
return preg_replace('/[^a-z0-9_\-\.,\']/i', '', $stringtosanitize);
|
|
||||||
} else {
|
|
||||||
return preg_replace('/[^a-z0-9_\-\.,]/i', '', $stringtosanitize);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1081,7 +1081,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable
|
|||||||
$publicmediasdirwithslash .= '/';
|
$publicmediasdirwithslash .= '/';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strpos($upload_dir, $publicmediasdirwithslash) !== 0) { // We never add .noexe on files into media directory
|
if (strpos($upload_dir, $publicmediasdirwithslash) !== 0 || !getDolGlobalInt("MAIN_DOCUMENT_DISABLE_NOEXE_IN_MEDIAS_DIR")) { // We never add .noexe on files into media directory
|
||||||
$file_name .= '.noexe';
|
$file_name .= '.noexe';
|
||||||
$successcode = 2;
|
$successcode = 2;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9022,7 +9022,12 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
|
|||||||
|
|
||||||
$value = preg_replace('/\s*\|\s*/', '|', $value);
|
$value = preg_replace('/\s*\|\s*/', '|', $value);
|
||||||
|
|
||||||
|
//natural mode search type 3 allow spaces into search ...
|
||||||
|
if ($mode == 3 || $mode == -3) {
|
||||||
|
$crits = explode(',', $value);
|
||||||
|
} else {
|
||||||
$crits = explode(' ', $value);
|
$crits = explode(' ', $value);
|
||||||
|
}
|
||||||
$res = '';
|
$res = '';
|
||||||
if (!is_array($fields)) {
|
if (!is_array($fields)) {
|
||||||
$fields = array($fields);
|
$fields = array($fields);
|
||||||
@@ -9072,7 +9077,7 @@ function natural_search($fields, $value, $mode = 0, $nofirstand = 0)
|
|||||||
$listofcodes .= "'".$db->escape($val)."'";
|
$listofcodes .= "'".$db->escape($val)."'";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$newres .= ($i2 > 0 ? ' OR ' : '').$field." ".($mode == -3 ? 'NOT ' : '')."IN (".$db->sanitize($listofcodes, 1).")";
|
$newres .= ($i2 > 0 ? ' OR ' : '').$field." ".($mode == -3 ? 'NOT ' : '')."IN (".$db->sanitize($listofcodes, 1, 0, 1).")";
|
||||||
$i2++; // a criteria was added to string
|
$i2++; // a criteria was added to string
|
||||||
}
|
}
|
||||||
if ($mode == -3) {
|
if ($mode == -3) {
|
||||||
|
|||||||
@@ -388,7 +388,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_propale['nb'];
|
print $product->stats_propale['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_propale['qty'];
|
print price($product->stats_propale['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -407,7 +407,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_proposal_supplier['nb'];
|
print $product->stats_proposal_supplier['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_proposal_supplier['qty'];
|
print price($product->stats_proposal_supplier['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -426,7 +426,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande['nb'];
|
print $product->stats_commande['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande['qty'];
|
print price($product->stats_commande['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -445,7 +445,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande_fournisseur['nb'];
|
print $product->stats_commande_fournisseur['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_commande_fournisseur['qty'];
|
print price($product->stats_commande_fournisseur['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -464,7 +464,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture['nb'];
|
print $product->stats_facture['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture['qty'];
|
print price($product->stats_facture['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -483,7 +483,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture_fournisseur['nb'];
|
print $product->stats_facture_fournisseur['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_facture_fournisseur['qty'];
|
print price($product->stats_facture_fournisseur['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
@@ -503,7 +503,7 @@ function show_stats_for_company($product, $socid)
|
|||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_contrat['nb'];
|
print $product->stats_contrat['nb'];
|
||||||
print '</td><td class="right">';
|
print '</td><td class="right">';
|
||||||
print $product->stats_contrat['qty'];
|
print price($product->stats_contrat['qty'], 1, $langs, 0, 0);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1333,6 +1333,8 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
// We set order into draft status
|
// We set order into draft status
|
||||||
$this->brouillon = 1;
|
$this->brouillon = 1;
|
||||||
|
$this->statut = self::STATUS_DRAFT; // deprecated
|
||||||
|
$this->status = self::STATUS_DRAFT;
|
||||||
|
|
||||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur (";
|
$sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur (";
|
||||||
$sql .= "ref";
|
$sql .= "ref";
|
||||||
@@ -2145,6 +2147,16 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$sql1 = "UPDATE ".MAIN_DB_PREFIX."commandedet SET fk_commandefourndet = NULL WHERE fk_commandefourndet IN (SELECT rowid FROM ".$main." WHERE fk_commande = ".((int) $this->id).")";
|
||||||
|
dol_syslog(__METHOD__." linked order lines", LOG_DEBUG);
|
||||||
|
if (!$this->db->query($sql1)) {
|
||||||
|
$error++;
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
|
$this->errors[] = $this->db->lasterror();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande =".((int) $this->id);
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande =".((int) $this->id);
|
||||||
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||||
if (!$this->db->query($sql)) {
|
if (!$this->db->query($sql)) {
|
||||||
@@ -3912,7 +3924,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql1 = 'UPDATE '.MAIN_DB_PREFIX."commandedet SET fk_commandefourndet = NULL WHERE rowid=".((int) $this->id);
|
$sql1 = "UPDATE ".MAIN_DB_PREFIX."commandedet SET fk_commandefourndet = NULL WHERE fk_commandefourndet=".((int) $this->id);
|
||||||
$resql = $this->db->query($sql1);
|
$resql = $this->db->query($sql1);
|
||||||
if (!$resql) {
|
if (!$resql) {
|
||||||
$this->db->rollback();
|
$this->db->rollback();
|
||||||
|
|||||||
@@ -986,6 +986,13 @@ class Holiday extends CommonObject
|
|||||||
$error++; $this->errors[] = "Error ".$this->db->lasterror();
|
$error++; $this->errors[] = "Error ".$this->db->lasterror();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$error) {
|
||||||
|
$result = $this->insertExtraFields();
|
||||||
|
if ($result < 0) {
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
if (!$notrigger) {
|
if (!$notrigger) {
|
||||||
// Call trigger
|
// Call trigger
|
||||||
|
|||||||
@@ -99,32 +99,27 @@ class Segment implements IteratorAggregate, Countable
|
|||||||
$reg='@\[!--\sIF\s([{}a-zA-Z0-9\.\,_]+)\s--\]@smU';
|
$reg='@\[!--\sIF\s([{}a-zA-Z0-9\.\,_]+)\s--\]@smU';
|
||||||
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
||||||
//var_dump($tmpvars);exit;
|
//var_dump($tmpvars);exit;
|
||||||
foreach($matches as $match) // For each match, if there is no entry into this->vars, we add it
|
foreach ($matches as $match) { // For each match, if there is no entry into this->vars, we add it
|
||||||
{
|
if (! empty($match[1]) && ! isset($tmpvars[$match[1]])) {
|
||||||
if (! empty($match[1]) && ! isset($tmpvars[$match[1]]))
|
|
||||||
{
|
|
||||||
$tmpvars[$match[1]] = ''; // Not defined, so we set it to '', we just need entry into this->vars for next loop
|
$tmpvars[$match[1]] = ''; // Not defined, so we set it to '', we just need entry into this->vars for next loop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Conditionals substitution
|
// Conditionals substitution
|
||||||
// Note: must be done before static substitution, else the variable will be replaced by its value and the conditional won't work anymore
|
// Note: must be done before static substitution, else the variable will be replaced by its value and the conditional won't work anymore
|
||||||
foreach($tmpvars as $key => $value)
|
foreach ($tmpvars as $key => $value) {
|
||||||
{
|
|
||||||
// If value is true (not 0 nor false nor null nor empty string)
|
// If value is true (not 0 nor false nor null nor empty string)
|
||||||
if ($value)
|
if ($value) {
|
||||||
{
|
|
||||||
// Remove the IF tag
|
// Remove the IF tag
|
||||||
$this->xml = str_replace('[!-- IF '.$key.' --]', '', $this->xml);
|
$this->xml = str_replace('[!-- IF '.$key.' --]', '', $this->xml);
|
||||||
// Remove everything between the ELSE tag (if it exists) and the ENDIF tag
|
// Remove everything between the ELSE tag (if it exists) and the ENDIF tag
|
||||||
$reg = '@(\[!--\sELSE\s' . $key . '\s--\](.*))?\[!--\sENDIF\s' . $key . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
$reg = '@(\[!--\sELSE\s' . preg_quote($key, '@') . '\s--\](.*))?\[!--\sENDIF\s' . preg_quote($key, '@') . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
||||||
$this->xml = preg_replace($reg, '', $this->xml);
|
$this->xml = preg_replace($reg, '', $this->xml);
|
||||||
}
|
}
|
||||||
// Else the value is false, then two cases: no ELSE and we're done, or there is at least one place where there is an ELSE clause, then we replace it
|
// Else the value is false, then two cases: no ELSE and we're done, or there is at least one place where there is an ELSE clause, then we replace it
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
// Find all conditional blocks for this variable: from IF to ELSE and to ENDIF
|
// Find all conditional blocks for this variable: from IF to ELSE and to ENDIF
|
||||||
$reg = '@\[!--\sIF\s' . $key . '\s--\](.*)(\[!--\sELSE\s' . $key . '\s--\](.*))?\[!--\sENDIF\s' . $key . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
$reg = '@\[!--\sIF\s' . preg_quote($key, '@') . '\s--\](.*)(\[!--\sELSE\s' . preg_quote($key, '@') . '\s--\](.*))?\[!--\sENDIF\s' . preg_quote($key, '@') . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
||||||
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
preg_match_all($reg, $this->xml, $matches, PREG_SET_ORDER);
|
||||||
foreach ($matches as $match) { // For each match, if there is an ELSE clause, we replace the whole block by the value in the ELSE clause
|
foreach ($matches as $match) { // For each match, if there is an ELSE clause, we replace the whole block by the value in the ELSE clause
|
||||||
if (!empty($match[3])) $this->xml = str_replace($match[0], $match[3], $this->xml);
|
if (!empty($match[3])) $this->xml = str_replace($match[0], $match[3], $this->xml);
|
||||||
@@ -308,4 +303,3 @@ IMG;
|
|||||||
return $this->xmlParsed;
|
return $this->xmlParsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ IMG;
|
|||||||
private function _parse($type = 'content')
|
private function _parse($type = 'content')
|
||||||
{
|
{
|
||||||
// Search all tags found into condition to complete $this->vars, so we will proceed all tests even if not defined
|
// Search all tags found into condition to complete $this->vars, so we will proceed all tests even if not defined
|
||||||
$reg='@\[!--\sIF\s([{}a-zA-Z0-9\.\,_]+)\s--\]@smU';
|
$reg='@\[!--\sIF\s([\[\]{}a-zA-Z0-9\.\,_]+)\s--\]@smU';
|
||||||
$matches = array();
|
$matches = array();
|
||||||
preg_match_all($reg, $this->contentXml, $matches, PREG_SET_ORDER);
|
preg_match_all($reg, $this->contentXml, $matches, PREG_SET_ORDER);
|
||||||
|
|
||||||
@@ -544,7 +544,7 @@ IMG;
|
|||||||
// Remove the IF tag
|
// Remove the IF tag
|
||||||
$this->contentXml = str_replace('[!-- IF '.$key.' --]', '', $this->contentXml);
|
$this->contentXml = str_replace('[!-- IF '.$key.' --]', '', $this->contentXml);
|
||||||
// Remove everything between the ELSE tag (if it exists) and the ENDIF tag
|
// Remove everything between the ELSE tag (if it exists) and the ENDIF tag
|
||||||
$reg = '@(\[!--\sELSE\s' . $key . '\s--\](.*))?\[!--\sENDIF\s' . $key . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
$reg = '@(\[!--\sELSE\s' . preg_quote($key, '@') . '\s--\](.*))?\[!--\sENDIF\s' . preg_quote($key, '@') . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
||||||
$this->contentXml = preg_replace($reg, '', $this->contentXml);
|
$this->contentXml = preg_replace($reg, '', $this->contentXml);
|
||||||
/*if ($sav != $this->contentXml)
|
/*if ($sav != $this->contentXml)
|
||||||
{
|
{
|
||||||
@@ -557,7 +557,7 @@ IMG;
|
|||||||
//dol_syslog("Var ".$key." is not defined, we remove the IF, ELSE and ENDIF ");
|
//dol_syslog("Var ".$key." is not defined, we remove the IF, ELSE and ENDIF ");
|
||||||
//$sav=$this->contentXml;
|
//$sav=$this->contentXml;
|
||||||
// Find all conditional blocks for this variable: from IF to ELSE and to ENDIF
|
// Find all conditional blocks for this variable: from IF to ELSE and to ENDIF
|
||||||
$reg = '@\[!--\sIF\s' . $key . '\s--\](.*)(\[!--\sELSE\s' . $key . '\s--\](.*))?\[!--\sENDIF\s' . $key . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
$reg = '@\[!--\sIF\s' . preg_quote($key, '@') . '\s--\](.*)(\[!--\sELSE\s' . preg_quote($key, '@') . '\s--\](.*))?\[!--\sENDIF\s' . preg_quote($key, '@') . '\s--\]@smU'; // U modifier = all quantifiers are non-greedy
|
||||||
preg_match_all($reg, $this->contentXml, $matches, PREG_SET_ORDER);
|
preg_match_all($reg, $this->contentXml, $matches, PREG_SET_ORDER);
|
||||||
foreach ($matches as $match) { // For each match, if there is an ELSE clause, we replace the whole block by the value in the ELSE clause
|
foreach ($matches as $match) { // For each match, if there is an ELSE clause, we replace the whole block by the value in the ELSE clause
|
||||||
if (!empty($match[3])) $this->contentXml = str_replace($match[0], $match[3], $this->contentXml);
|
if (!empty($match[3])) $this->contentXml = str_replace($match[0], $match[3], $this->contentXml);
|
||||||
|
|||||||
@@ -332,6 +332,8 @@ ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float;
|
|||||||
|
|
||||||
ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL AFTER fk_country;
|
ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL AFTER fk_country;
|
||||||
|
|
||||||
|
ALTER TABLE llx_product CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
|
||||||
ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255);
|
ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255);
|
||||||
ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255);
|
ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255);
|
||||||
ALTER TABLE llx_actioncomm ADD COLUMN reply_to varchar(255);
|
ALTER TABLE llx_actioncomm ADD COLUMN reply_to varchar(255);
|
||||||
@@ -597,3 +599,172 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position)
|
|||||||
|
|
||||||
ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);
|
ALTER TABLE llx_export_model MODIFY COLUMN type varchar(64);
|
||||||
|
|
||||||
|
|
||||||
|
-- ALL tms thanks to regis (commit 111f73bd863c7120a9c13a8fc9ae227a02079cb0)
|
||||||
|
|
||||||
|
ALTER TABLE llx_accounting_account CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_accounting_bookkeeping_tmp CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_accounting_fiscalyear CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_actioncomm_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_actioncomm CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_adherent_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_adherent CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_adherent_type_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_adherent_type CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_advtargetemailing CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_asset_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_asset CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_asset_type_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_asset_type CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_bank_account_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_bank_account CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_bank CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_blockedlog_authority CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_blockedlog CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_bom_bom_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_bom_bomline_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_bom_bom CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_bordereau_cheque CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_boxes_def CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_budget_lines CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_budget CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_categories_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_categorie CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_c_email_senderprofile CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_c_email_templates CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_c_field_list CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_chargesociales CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commandedet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande_fournisseurdet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande_fournisseur_dispatch_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande_fournisseur_dispatch CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande_fournisseur_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande_fournisseur_log CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande_fournisseur CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_commande CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_comment CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_const CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_contratdet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_contratdet_log CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_contratdet CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_contrat_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_contrat CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_cronjob CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_c_shipment_mode CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_deplacement CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_don_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_don CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_element_resources CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_emailcollector_emailcollectoraction CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_emailcollector_emailcollectorfilter CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_emailcollector_emailcollector CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_entrepot_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_entrepot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_establishment CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_events CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_expeditiondet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_expedition_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_expedition CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_expensereport_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_expensereport_ik CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_expensereport_rules CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_expensereport CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facturedet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facturedet_rec_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facture_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facture_fourn_det_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facture_fourn_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facture_fourn CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facture_rec_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facture_rec CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_facture CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_fichinterdet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_fichinter_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_fichinter CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_holiday_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_holiday CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_inventorydet CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_inventorydet CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_inventory CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_inventory CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_loan_schedule CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_loan CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_localtax CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_mailing_cibles CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_mailing CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_mailing_unsubscribe CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_menu CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_mrp_mo_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_mrp_mo CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_mrp_production CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_notify_def CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_notify CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_online_signatures CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_opensurvey_comments CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_opensurvey_user_studs CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_paiementcharge CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_paiementfourn CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_paiement CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_payment_donation CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_payment_expensereport CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_payment_loan CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_payment_salary_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_payment_salary CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_payment_various CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_pos_cash_fence CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_printing CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_batch CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_customer_price CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_fournisseur_price_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_fournisseur_price CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_lot_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_lot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_price_by_qty CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_price CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_stock_entrepot CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_product_stock CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_projet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_projet CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_projet_task_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_projet_task CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_propaldet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_propal_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_propal_merge_pdf_product CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_propal CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_reception_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_reception CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_resource_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_resource CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_account CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_address CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_contacts CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_prices CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_remise CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_remise_supplier CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe_rib CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_societe CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_socpeople_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_socpeople CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_stock_mouvement CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_subscription CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_supplier_proposaldet_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_supplier_proposal_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_supplier_proposal CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_ticket_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_ticket CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_tva CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_user_employment CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_user_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_usergroup_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_usergroup CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_user_rib CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_user CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_website_extrafields CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_website_page CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_website CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
ALTER TABLE llx_zapier_hook CHANGE COLUMN tms tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
|||||||
@@ -195,9 +195,19 @@ if ($action == 'order' && GETPOST('valid')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$line->tva_tx = $productsupplier->vatrate_supplier;
|
$line->tva_tx = $productsupplier->vatrate_supplier;
|
||||||
|
$tva = $line->tva_tx / 100;
|
||||||
|
|
||||||
|
// If we use multicurrency
|
||||||
|
if (isModEnabled('multicurrency') && !empty($productsupplier->fourn_multicurrency_code) && $productsupplier->fourn_multicurrency_code != $conf->currency) {
|
||||||
|
$line->multicurrency_code = $productsupplier->fourn_multicurrency_code;
|
||||||
|
$line->fk_multicurrency = $productsupplier->fourn_multicurrency_id;
|
||||||
|
$line->multicurrency_subprice = $productsupplier->fourn_multicurrency_unitprice;
|
||||||
|
$line->multicurrency_total_ht = $line->multicurrency_subprice * $qty;
|
||||||
|
$line->multicurrency_total_tva = $line->multicurrency_total_ht * $tva;
|
||||||
|
$line->multicurrency_total_ttc = $line->multicurrency_total_ht + $line->multicurrency_total_tva;
|
||||||
|
}
|
||||||
$line->subprice = $productsupplier->fourn_pu;
|
$line->subprice = $productsupplier->fourn_pu;
|
||||||
$line->total_ht = $productsupplier->fourn_pu * $qty;
|
$line->total_ht = $productsupplier->fourn_pu * $qty;
|
||||||
$tva = $line->tva_tx / 100;
|
|
||||||
$line->total_tva = $line->total_ht * $tva;
|
$line->total_tva = $line->total_ht * $tva;
|
||||||
$line->total_ttc = $line->total_ht + $line->total_tva;
|
$line->total_ttc = $line->total_ht + $line->total_tva;
|
||||||
$line->remise_percent = $productsupplier->remise_percent;
|
$line->remise_percent = $productsupplier->remise_percent;
|
||||||
@@ -262,7 +272,8 @@ if ($action == 'order' && GETPOST('valid')) {
|
|||||||
null,
|
null,
|
||||||
null,
|
null,
|
||||||
0,
|
0,
|
||||||
$line->fk_unit
|
$line->fk_unit,
|
||||||
|
$line->multicurrency_subprice ?? 0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
@@ -277,6 +288,7 @@ if ($action == 'order' && GETPOST('valid')) {
|
|||||||
} else {
|
} else {
|
||||||
$order->socid = $suppliersid[$i];
|
$order->socid = $suppliersid[$i];
|
||||||
$order->fetch_thirdparty();
|
$order->fetch_thirdparty();
|
||||||
|
$order->multicurrency_code = $order->thirdparty->multicurrency_code;
|
||||||
|
|
||||||
// Trick to know which orders have been generated using the replenishment feature
|
// Trick to know which orders have been generated using the replenishment feature
|
||||||
$order->source = $order::SOURCE_ID_REPLENISHMENT;
|
$order->source = $order::SOURCE_ID_REPLENISHMENT;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ if (is_array($object->lines) && (count($object->lines) > 0)) {
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$user->getrights();
|
$user->getrights('', 1); // We force rights reload to have the correct permissions for user in the entity we just switched in
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reload langs
|
// Reload langs
|
||||||
|
|||||||
Reference in New Issue
Block a user