Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5713bf025c
@ -39,6 +39,9 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height', 160);
|
|||||||
$id = GETPOST('account') ?GETPOST('account', 'alpha') : GETPOST('id');
|
$id = GETPOST('account') ?GETPOST('account', 'alpha') : GETPOST('id');
|
||||||
$ref = GETPOST('ref');
|
$ref = GETPOST('ref');
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('bankannualreport', 'globalcard'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
|
$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
|
||||||
$fieldtype = (!empty($ref) ? 'ref' : 'rowid');
|
$fieldtype = (!empty($ref) ? 'ref' : 'rowid');
|
||||||
|
|||||||
@ -38,6 +38,9 @@ $ref = GETPOST('ref', 'alpha');
|
|||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'aZ09');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('bankaccountdocuments', 'globalcard'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$action = '';
|
$action = '';
|
||||||
|
|||||||
@ -35,6 +35,9 @@ $langs->loadLangs(array('banks', 'categories'));
|
|||||||
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width', 768);
|
$WIDTH = DolGraph::getDefaultGraphSizeForStats('width', 768);
|
||||||
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height', 200);
|
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height', 200);
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('bankstats', 'globalcard'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (GETPOST('account') || GETPOST('ref')) {
|
if (GETPOST('account') || GETPOST('ref')) {
|
||||||
$id = GETPOST('account') ? GETPOST('account') : GETPOST('ref');
|
$id = GETPOST('account') ? GETPOST('account') : GETPOST('ref');
|
||||||
|
|||||||
@ -62,6 +62,9 @@ $newbankreceipt = GETPOST('newbankreceipt', 'alpha');
|
|||||||
$rel = GETPOST("rel", 'alphanohtml');
|
$rel = GETPOST("rel", 'alphanohtml');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||||
|
$hookmanager->initHooks(array('bankaccountstatement', 'globalcard'));
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$fieldid = (!empty($ref) ? $ref : $id);
|
$fieldid = (!empty($ref) ? $ref : $id);
|
||||||
$fieldname = (!empty($ref) ? 'ref' : 'rowid');
|
$fieldname = (!empty($ref) ? 'ref' : 'rowid');
|
||||||
|
|||||||
@ -171,6 +171,8 @@ class Facture extends CommonInvoice
|
|||||||
public $total_ttc;
|
public $total_ttc;
|
||||||
public $revenuestamp;
|
public $revenuestamp;
|
||||||
|
|
||||||
|
public $resteapayer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ! Closing after partial payment: discount_vat, badcustomer or badsupplier, bankcharge, other
|
* ! Closing after partial payment: discount_vat, badcustomer or badsupplier, bankcharge, other
|
||||||
* ! Closing when no payment: replaced, abandoned
|
* ! Closing when no payment: replaced, abandoned
|
||||||
|
|||||||
@ -6270,7 +6270,7 @@ abstract class CommonObject
|
|||||||
case 'date':
|
case 'date':
|
||||||
case 'datetime':
|
case 'datetime':
|
||||||
// If data is a string instead of a timestamp, we convert it
|
// If data is a string instead of a timestamp, we convert it
|
||||||
if (!is_int($this->array_options[$key])) {
|
if (!is_numeric($this->array_options[$key]) || $this->array_options[$key] != intval($this->array_options[$key])) {
|
||||||
$this->array_options[$key] = strtotime($this->array_options[$key]);
|
$this->array_options[$key] = strtotime($this->array_options[$key]);
|
||||||
}
|
}
|
||||||
$new_array_options[$key] = $this->db->idate($this->array_options[$key]);
|
$new_array_options[$key] = $this->db->idate($this->array_options[$key]);
|
||||||
|
|||||||
@ -107,6 +107,25 @@ abstract class DoliDB implements Database
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a SQL REGEXP
|
||||||
|
*
|
||||||
|
* @param string $subject string tested
|
||||||
|
* @param string $pattern SQL pattern to match
|
||||||
|
* @param string $sqlstring whether or not the string being tested is an SQL expression
|
||||||
|
* @return string SQL string
|
||||||
|
*/
|
||||||
|
public function regexpsql($subject, $pattern, $sqlstring = false)
|
||||||
|
{
|
||||||
|
if ($sqlstring) {
|
||||||
|
return "(". $subject ." REGEXP '" . $pattern . "')";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "('". $subject ."' REGEXP '" . $pattern . "')";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
* Convert (by PHP) a GM Timestamp date into a string date with PHP server TZ to insert into a date field.
|
||||||
* Function to use to build INSERT, UPDATE or WHERE predica
|
* Function to use to build INSERT, UPDATE or WHERE predica
|
||||||
|
|||||||
@ -757,6 +757,24 @@ class DoliDBPgsql extends DoliDB
|
|||||||
return '(CASE WHEN '.$test.' THEN '.$resok.' ELSE '.$resko.' END)';
|
return '(CASE WHEN '.$test.' THEN '.$resok.' ELSE '.$resko.' END)';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Format a SQL REGEXP
|
||||||
|
*
|
||||||
|
* @param string $subject string tested
|
||||||
|
* @param string $pattern SQL pattern to match
|
||||||
|
* @param string $sqlstring whether or not the string being tested is an SQL expression
|
||||||
|
* @return string SQL string
|
||||||
|
*/
|
||||||
|
public function regexpsql($subject, $pattern, $sqlstring = false)
|
||||||
|
{
|
||||||
|
if ($sqlstring) {
|
||||||
|
return "(". $subject ." ~ '" . $pattern . "')";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "('". $subject ."' ~ '" . $pattern . "')";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie le code erreur generique de l'operation precedente.
|
* Renvoie le code erreur generique de l'operation precedente.
|
||||||
*
|
*
|
||||||
|
|||||||
@ -1282,6 +1282,11 @@ function get_next_value($db, $mask, $table, $field, $where = '', $objsoc = '', $
|
|||||||
$sql .= " FROM ".MAIN_DB_PREFIX.$table;
|
$sql .= " FROM ".MAIN_DB_PREFIX.$table;
|
||||||
$sql .= " WHERE ".$field." LIKE '".$db->escape($maskLike)."'";
|
$sql .= " WHERE ".$field." LIKE '".$db->escape($maskLike)."'";
|
||||||
$sql .= " AND ".$field." NOT LIKE '(PROV%)'";
|
$sql .= " AND ".$field." NOT LIKE '(PROV%)'";
|
||||||
|
|
||||||
|
// To ensure that all variables within the MAX() brackets are integers
|
||||||
|
$sql .= " AND ". $db->regexpsql($sqlstring, '^[0-9]+$', true);
|
||||||
|
|
||||||
|
|
||||||
if ($bentityon) { // only if entity enable
|
if ($bentityon) { // only if entity enable
|
||||||
$sql .= " AND entity IN (".getEntity($sharetable).")";
|
$sql .= " AND entity IN (".getEntity($sharetable).")";
|
||||||
} elseif (!empty($forceentity)) {
|
} elseif (!empty($forceentity)) {
|
||||||
@ -2234,7 +2239,11 @@ function dolGetElementUrl($objectid, $objecttype, $withpicto = 0, $option = '')
|
|||||||
$classpath = 'compta/facture/class';
|
$classpath = 'compta/facture/class';
|
||||||
$classfile = 'facture-rec';
|
$classfile = 'facture-rec';
|
||||||
$classname = 'FactureRec';
|
$classname = 'FactureRec';
|
||||||
$module='facture';
|
$module = 'facture';
|
||||||
|
} elseif ($objecttype == 'mailing') {
|
||||||
|
$classpath = 'comm/mailing/class';
|
||||||
|
$classfile = 'mailing';
|
||||||
|
$classname = 'Mailing';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isModEnabled($module)) {
|
if (isModEnabled($module)) {
|
||||||
|
|||||||
@ -860,7 +860,7 @@ class modProduct extends DolibarrModules
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->import_updatekeys_array[$r] = array('sp.fk_product'=>'ProductOrService', 'sp.ref_fourn'=>'SupplierRef', 'sp.fk_soc'=>'Supplier');
|
$this->import_updatekeys_array[$r] = array('sp.fk_product'=>'ProductOrService', 'sp.ref_fourn'=>'SupplierRef', 'sp.fk_soc'=>'Supplier', 'sp.quantity'=>"QtyMin");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
|
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||||
|
|||||||
@ -742,7 +742,7 @@ class InterfaceActionsAuto extends DolibarrTriggers
|
|||||||
if (!is_object($member)) { // This should not happen
|
if (!is_object($member)) { // This should not happen
|
||||||
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
$member = new Adherent($this->db);
|
$member = new Adherent($this->db);
|
||||||
$member->fetch($this->fk_adherent);
|
$member->fetch($object->fk_adherent);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($object->actionmsg2)) {
|
if (empty($object->actionmsg2)) {
|
||||||
|
|||||||
@ -54,6 +54,8 @@ ALTER TABLE llx_user DROP COLUMN idpers3;
|
|||||||
|
|
||||||
UPDATE llx_c_actioncomm SET type = 'system' WHERE code = 'AC_OTH';
|
UPDATE llx_c_actioncomm SET type = 'system' WHERE code = 'AC_OTH';
|
||||||
|
|
||||||
|
ALTER TABLE llx_opensurvey_user_studs MODIFY reponses VARCHAR(200) NOT NULL;
|
||||||
|
|
||||||
-- v17
|
-- v17
|
||||||
|
|
||||||
ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_type varchar(32);
|
ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_type varchar(32);
|
||||||
|
|||||||
@ -19,7 +19,7 @@ CREATE TABLE llx_opensurvey_user_studs (
|
|||||||
id_users INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
id_users INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
nom VARCHAR(64) NOT NULL,
|
nom VARCHAR(64) NOT NULL,
|
||||||
id_sondage VARCHAR(16) NOT NULL,
|
id_sondage VARCHAR(16) NOT NULL,
|
||||||
reponses VARCHAR(100) NOT NULL, -- Not used for 'F' surveys
|
reponses VARCHAR(200) NOT NULL, -- Not used for 'F' surveys
|
||||||
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||||
date_creation datetime NOT NULL,
|
date_creation datetime NOT NULL,
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|||||||
@ -102,8 +102,6 @@ $morehtmlref .= '</div>';
|
|||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/loan/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
$object->totalpaid = $totalpaid; // To give a chance to dol_banner_tab to use already paid amount to show correct status
|
|
||||||
|
|
||||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
|
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
|
||||||
|
|
||||||
print '<div class="fichecenter">';
|
print '<div class="fichecenter">';
|
||||||
|
|||||||
@ -37,6 +37,7 @@ if (!$user->rights->opensurvey->write) {
|
|||||||
$_SESSION["formatsondage"] = "D";
|
$_SESSION["formatsondage"] = "D";
|
||||||
|
|
||||||
$erreur = false;
|
$erreur = false;
|
||||||
|
$erreurNbchoice = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -49,6 +50,10 @@ if (GETPOST('confirmation')) {
|
|||||||
$nbofchoice = count($_SESSION["totalchoixjour"]);
|
$nbofchoice = count($_SESSION["totalchoixjour"]);
|
||||||
$errheure = array();
|
$errheure = array();
|
||||||
|
|
||||||
|
if ($nbofchoice * $_SESSION["nbrecaseshoraires"] > 200) {
|
||||||
|
setEventMessages($langs->trans("ErrorFieldTooLong"), null, 'errors');
|
||||||
|
$erreurNb++;
|
||||||
|
} else {
|
||||||
for ($i = 0; $i < $nbofchoice; $i++) {
|
for ($i = 0; $i < $nbofchoice; $i++) {
|
||||||
// Show hours choices
|
// Show hours choices
|
||||||
for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) {
|
for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) {
|
||||||
@ -156,6 +161,8 @@ if (GETPOST('confirmation')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!empty($errheure)) {
|
if (!empty($errheure)) {
|
||||||
setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors');
|
setEventMessages($langs->trans("ErrorBadFormat"), null, 'errors');
|
||||||
@ -170,7 +177,7 @@ if (GETPOST('confirmation')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add survey into database
|
// Add survey into database
|
||||||
if (!$erreur) {
|
if (!$erreur && $erreurNb == 0) {
|
||||||
$_SESSION["toutchoix"] = substr("$choixdate", 1);
|
$_SESSION["toutchoix"] = substr("$choixdate", 1);
|
||||||
|
|
||||||
ajouter_sondage();
|
ajouter_sondage();
|
||||||
|
|||||||
@ -114,10 +114,6 @@ llxHeader('', $langs->trans("Resource"));
|
|||||||
// View and edit mode
|
// View and edit mode
|
||||||
|
|
||||||
if ($id > 0 || !empty($ref)) {
|
if ($id > 0 || !empty($ref)) {
|
||||||
$soc = new Societe($db);
|
|
||||||
$soc->fetch($object->socid);
|
|
||||||
|
|
||||||
|
|
||||||
$head = resource_prepare_head($object);
|
$head = resource_prepare_head($object);
|
||||||
print dol_get_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), -1, 'resource');
|
print dol_get_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), -1, 'resource');
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user