forked from Wavyzz/dolibarr
Compare commits
36 Commits
5.0.0-beta
...
3.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ecc1afa9e | ||
|
|
ceb1e699b7 | ||
|
|
c028819cab | ||
|
|
9d582a53ca | ||
|
|
ca1e3b4d55 | ||
|
|
94bb1ac511 | ||
|
|
8893d8d59f | ||
|
|
e61bcd03ed | ||
|
|
3295498e9e | ||
|
|
71818da6a5 | ||
|
|
c53aef9955 | ||
|
|
a18995d3dc | ||
|
|
3017e2b3a0 | ||
|
|
adbb41799c | ||
|
|
12d7b92556 | ||
|
|
6fb0fc7b71 | ||
|
|
f694939fc7 | ||
|
|
d0d9de37f4 | ||
|
|
1bfdc7438a | ||
|
|
9352ecca1f | ||
|
|
774c624687 | ||
|
|
5439390461 | ||
|
|
6fc4dacd42 | ||
|
|
b970596310 | ||
|
|
38ccf7ffdd | ||
|
|
290caba160 | ||
|
|
c01988ba43 | ||
|
|
797b68fc20 | ||
|
|
90e8f062e9 | ||
|
|
f49552f6b7 | ||
|
|
39f35bbaab | ||
|
|
321933f267 | ||
|
|
f49d332b73 | ||
|
|
46d84f8f11 | ||
|
|
97e21cb775 | ||
|
|
829ff2299e |
@@ -126,10 +126,10 @@ before_script:
|
||||
echo "Set timezone"
|
||||
echo 'date.timezone = "Europe/Paris"' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
if [ "$TRAVIS_PHP_VERSION" = '5.3' ] || [ "$TRAVIS_PHP_VERSION" = '5.4' ]; then
|
||||
echo
|
||||
echo "Enabling APC for PHP <= 5.4"
|
||||
#echo
|
||||
#echo "Enabling APC for PHP <= 5.4"
|
||||
# Documentation says it should be available for PHP <= 5.6 but it's not for 5.5 and 5.6!
|
||||
echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
#echo 'extension = apc.so' >> ~/.phpenv/versions/$PHP_VERSION_NAME/etc/php.ini
|
||||
echo
|
||||
echo "Enabling Memcached for PHP <= 5.4"
|
||||
# Documentation says it should be available for all PHP versions but it's not for 5.5 and 5.6, 7.0 and nightly!
|
||||
|
||||
@@ -919,7 +919,14 @@ if (count($listofextcals))
|
||||
// Complete $eventarray with events coming from external module
|
||||
$parameters=array(); $object=null;
|
||||
$reshook=$hookmanager->executeHooks('getCalendarEvents',$parameters,$object,$action);
|
||||
if (! empty($hookmanager->resArray['eventarray'])) $eventarray=array_merge($eventarray, $hookmanager->resArray['eventarray']);
|
||||
if (! empty($hookmanager->resArray['eventarray'])) {
|
||||
foreach ($hookmanager->resArray['eventarray'] as $keyDate => $events) {
|
||||
if (!isset($eventarray[$keyDate])) {
|
||||
$eventarray[$keyDate]=array();
|
||||
}
|
||||
$eventarray[$keyDate]=array_merge($eventarray[$keyDate], $events);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -87,6 +87,17 @@ if ($action == 'delete')
|
||||
{
|
||||
if (GETPOST('categid'))
|
||||
{
|
||||
// Delete bank class
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_class";
|
||||
$sql.= " WHERE fk_categ = '".GETPOST('categid')."'";
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result)
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
// Delete bank categ
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."bank_categ";
|
||||
$sql.= " WHERE rowid = '".GETPOST('categid')."'";
|
||||
$sql.= " AND entity = ".$conf->entity;
|
||||
|
||||
@@ -282,6 +282,8 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
|
||||
$refcomp=$societestatic->getNomUrl(1,'',24);
|
||||
|
||||
$paiement = $facturestatic->getSommePaiement(); // Payment already done
|
||||
$paiement+= $facturestatic->getSumDepositsUsed();
|
||||
$paiement+= $facturestatic->getSumCreditNotesUsed();
|
||||
}
|
||||
if ($obj->family == 'social_contribution')
|
||||
{
|
||||
|
||||
@@ -127,13 +127,15 @@ class FormProjets
|
||||
// Search all projects
|
||||
$sql = 'SELECT p.rowid, p.ref, p.title, p.fk_soc, p.fk_statut, p.public';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX .'projet as p';
|
||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||
$sql.= " WHERE p.entity IN (".getEntity('project',1).")";
|
||||
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
|
||||
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
|
||||
if ($socid > 0) $sql.= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
|
||||
if (!empty($filterkey)) {
|
||||
$sql .= ' AND p.title LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||
$sql .= ' AND (';
|
||||
$sql .= ' p.title LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||
$sql .= ' OR p.ref LIKE "%'.$this->db->escape($filterkey).'%"';
|
||||
$sql .= ')';
|
||||
}
|
||||
$sql.= " ORDER BY p.ref ASC";
|
||||
|
||||
|
||||
@@ -527,13 +527,14 @@ class PaymentExpenseReport extends CommonObject
|
||||
{
|
||||
if ($mode == 'payment_expensereport')
|
||||
{
|
||||
$euser = new User($this->db);
|
||||
$euser->fetch($key);
|
||||
$er = new ExpenseReport($this->db);
|
||||
$er->fetch($key);
|
||||
$er->fetch_user($er->fk_user_author);
|
||||
$result=$acc->add_url_line(
|
||||
$bank_line_id,
|
||||
$euser->id,
|
||||
$er->user->id,
|
||||
DOL_URL_ROOT.'/user/card.php?id=',
|
||||
$euser->getFullName($langs),
|
||||
$er->user->getFullName($langs),
|
||||
'user'
|
||||
);
|
||||
if ($result <= 0)
|
||||
|
||||
@@ -131,11 +131,11 @@ class Export
|
||||
//print_r("$perm[0]-$perm[1]-$perm[2]<br>");
|
||||
if (! empty($perm[2]))
|
||||
{
|
||||
$bool=$user->rights->$perm[0]->$perm[1]->$perm[2];
|
||||
$bool=$user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]};
|
||||
}
|
||||
else
|
||||
{
|
||||
$bool=$user->rights->$perm[0]->$perm[1];
|
||||
$bool=$user->rights->{$perm[0]}->{$perm[1]};
|
||||
}
|
||||
if ($perm[0]=='user' && $user->admin) $bool=true;
|
||||
if (! $bool) break;
|
||||
|
||||
@@ -1051,6 +1051,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
$this->lines[$i]->remise_percent,
|
||||
'HT',
|
||||
0,
|
||||
$this->lines[$i]->product_type,
|
||||
$this->lines[$i]->info_bits
|
||||
);
|
||||
if ($result < 0)
|
||||
|
||||
@@ -62,6 +62,21 @@ ALTER TABLE llx_societe MODIFY COLUMN fk_currency varchar(3) NULL;
|
||||
ALTER TABLE llx_bookmark ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
||||
ALTER TABLE llx_bookmark MODIFY COLUMN url varchar(255) NOT NULL;
|
||||
|
||||
|
||||
-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT '2001-01-01 00:00:00';
|
||||
|
||||
-- Clean corrupted values for tms
|
||||
-- VMYSQL4.1 SET sql_mode = 'ALLOW_INVALID_DATES';
|
||||
-- VMYSQL4.1 update llx_opensurvey_sondage set tms = date_fin where DATE(STR_TO_DATE(tms, '%Y-%m-%d')) IS NULL;
|
||||
-- VMYSQL4.1 SET sql_mode = 'NO_ZERO_DATE';
|
||||
-- VMYSQL4.1 update llx_opensurvey_sondage set tms = date_fin where DATE(STR_TO_DATE(tms, '%Y-%m-%d')) IS NULL;
|
||||
-- Remove default not null on date_fin
|
||||
-- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL;
|
||||
-- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL;
|
||||
|
||||
-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP;
|
||||
|
||||
|
||||
ALTER TABLE llx_opensurvey_sondage ADD COLUMN entity integer DEFAULT 1 NOT NULL;
|
||||
ALTER TABLE llx_opensurvey_sondage ADD COLUMN allow_comments tinyint NOT NULL DEFAULT 1;
|
||||
-- ALTER TABLE llx_opensurvey_sondage DROP COLUMN survey_link_visible;
|
||||
@@ -189,9 +204,14 @@ CREATE TABLE llx_payment_salary (
|
||||
fk_user_modif integer
|
||||
)ENGINE=innodb;
|
||||
|
||||
|
||||
DELETE FROM llx_product_batch where fk_product_stock NOT IN (SELECT rowid from llx_product_stock);
|
||||
|
||||
ALTER TABLE llx_product_batch ADD INDEX idx_fk_product_stock (fk_product_stock);
|
||||
ALTER TABLE llx_product_batch ADD CONSTRAINT fk_product_batch_fk_product_stock FOREIGN KEY (fk_product_stock) REFERENCES llx_product_stock (rowid);
|
||||
|
||||
DELETE FROM llx_expeditiondet_batch where fk_expeditiondet NOT IN (SELECT rowid from llx_expeditiondet);
|
||||
|
||||
ALTER TABLE llx_expeditiondet_batch ADD INDEX idx_fk_expeditiondet (fk_expeditiondet);
|
||||
ALTER TABLE llx_expeditiondet_batch ADD CONSTRAINT fk_expeditiondet_batch_fk_expeditiondet FOREIGN KEY (fk_expeditiondet) REFERENCES llx_expeditiondet(rowid);
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
--
|
||||
-- Be carefull to requests order.
|
||||
-- This file must be loaded by calling /install/index.php page
|
||||
-- when current version is 3.9.0 or higher.
|
||||
--
|
||||
-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new;
|
||||
-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol;
|
||||
-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60);
|
||||
-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname;
|
||||
-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60);
|
||||
-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name;
|
||||
-- To restrict request to Mysql version x.y use -- VMYSQLx.y
|
||||
-- To restrict request to Pgsql version x.y use -- VPGSQLx.y
|
||||
-- To make pk to be auto increment (mysql): VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT;
|
||||
-- To make pk to be auto increment (postgres): VPGSQL8.2 NOT POSSIBLE. MUST DELETE/CREATE TABLE
|
||||
-- To set a field as NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL;
|
||||
-- To set a field as default NULL: VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL;
|
||||
-- -- VPGSQL8.2 DELETE FROM llx_usergroup_user WHERE fk_user NOT IN (SELECT rowid from llx_user);
|
||||
-- -- VMYSQL4.1 DELETE FROM llx_usergroup_user WHERE fk_usergroup NOT IN (SELECT rowid from llx_usergroup);
|
||||
|
||||
-- Fix bad data
|
||||
update llx_opensurvey_sondage set format = 'D' where format = 'D+';
|
||||
update llx_opensurvey_sondage set format = 'A' where format = 'A+';
|
||||
|
||||
INSERT INTO llx_const (name, value, type, note, visible) values ('MAIN_DELAY_EXPENSEREPORTS_TO_PAY','31','chaine','Tolérance de retard avant alerte (en jours) sur les notes de frais impayées',0);
|
||||
|
||||
ALTER TABLE llx_accounting_system MODIFY COLUMN pcg_version varchar(32);
|
||||
ALTER TABLE llx_accountingaccount MODIFY COLUMN fk_pcg_version varchar(32);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ create table llx_product
|
||||
|
||||
datec datetime,
|
||||
tms timestamp,
|
||||
virtual tinyint DEFAULT 0 NOT NULL, -- Not used. Used by external modules. Value 0 for physical product, 1 for virtual product
|
||||
`virtual` tinyint DEFAULT 0 NOT NULL, -- Not used. Used by external modules. Value 0 for physical product, 1 for virtual product
|
||||
fk_parent integer DEFAULT 0, -- Not used. Used by external modules. Virtual product id
|
||||
|
||||
label varchar(255) NOT NULL,
|
||||
|
||||
@@ -876,10 +876,26 @@ class Product extends CommonObject
|
||||
// End call triggers
|
||||
}
|
||||
|
||||
// Delete all child tables
|
||||
// Delete from product_batch on product delete
|
||||
if (! $error)
|
||||
{
|
||||
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock','product_customer_price');
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX.'product_batch';
|
||||
$sql.= " WHERE fk_product_stock IN (";
|
||||
$sql.= "SELECT rowid FROM ".MAIN_DB_PREFIX.'product_stock';
|
||||
$sql.= " WHERE fk_product = ".$id.")";
|
||||
dol_syslog(get_class($this).'::delete', LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if (! $result)
|
||||
{
|
||||
$error++;
|
||||
$this->errors[] = $this->db->lasterror();
|
||||
}
|
||||
}
|
||||
|
||||
// Delete all child tables
|
||||
if (! $error)
|
||||
{
|
||||
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock','product_customer_price'); // product_batch done before
|
||||
foreach($elements as $table)
|
||||
{
|
||||
if (! $error)
|
||||
|
||||
Reference in New Issue
Block a user