diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php
index 2bed305783a..cfb7372308a 100644
--- a/htdocs/adherents/admin/adherent.php
+++ b/htdocs/adherents/admin/adherent.php
@@ -138,7 +138,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
print '';
print '';
print '
| '.$langs->trans("AdherentLoginRequired").' | ';
- print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?$conf->global->ADHERENT_LOGIN_NOT_REQUIRED:1),1);
+ print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)?0:1),1);
print ' | ';
print '';
print " |
\n";
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 1651407d746..565e63fd749 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -125,8 +125,8 @@ class FactureRec extends Facture
$sql.= ", '".$facsrc->socid."'";
$sql.= ", ".$conf->entity;
$sql.= ", ".$this->db->idate($now);
- $sql.= ", '".$facsrc->amount."'";
- $sql.= ", '".$facsrc->remise."'";
+ $sql.= ", ".(!empty($facsrc->amount)?$facsrc->amount:'0');
+ $sql.= ", ".(!empty($facsrc->remise)?$this->remise:'0');
$sql.= ", ".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL");
$sql.= ", ".(!empty($this->note_public)?("'".$this->db->escape($this->note_public)."'"):"NULL");
$sql.= ", '".$user->id."'";
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 642c2b6376a..abd5f4da7d0 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -228,7 +228,6 @@ class Product extends CommonObject
if (empty($this->status)) $this->status = 0;
if (empty($this->status_buy)) $this->status_buy = 0;
- if (empty($this->finished)) $this->finished = 0;
$price_ht=0;
$price_ttc=0;
@@ -318,7 +317,7 @@ class Product extends CommonObject
$sql.= ", ".$this->status;
$sql.= ", ".$this->status_buy;
$sql.= ", '".$this->canvas."'";
- $sql.= ", ".$this->finished;
+ $sql.= ", ".((! isset($this->finished) || $this->finished < 0)?'null':$this->finished);
$sql.= ")";
dol_syslog(get_class($this)."::Create sql=".$sql);
@@ -437,7 +436,6 @@ class Product extends CommonObject
if (empty($this->localtax1_tx)) $this->localtax1_tx = 0;
if (empty($this->localtax2_tx)) $this->localtax2_tx = 0;
- if (empty($this->finished)) $this->finished = 0;
if (empty($this->country_id)) $this->country_id = 0;
$this->accountancy_code_buy = trim($this->accountancy_code_buy);
@@ -455,7 +453,7 @@ class Product extends CommonObject
$sql.= ",tosell = " . $this->status;
$sql.= ",tobuy = " . $this->status_buy;
- $sql.= ",finished = " . ($this->finished<0 ? "null" : $this->finished);
+ $sql.= ",finished = " . ((! isset($this->finished) || $this->finished < 0) ? "null" : $this->finished);
$sql.= ",weight = " . ($this->weight!='' ? "'".$this->weight."'" : 'null');
$sql.= ",weight_units = " . ($this->weight_units!='' ? "'".$this->weight_units."'": 'null');
$sql.= ",length = " . ($this->length!='' ? "'".$this->length."'" : 'null');
diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php
index 7154b7271d3..8bec9528b87 100644
--- a/htdocs/product/fiche.php
+++ b/htdocs/product/fiche.php
@@ -313,7 +313,6 @@ if (empty($reshook))
$object->ref = GETPOST('clone_ref');
$object->status = 0;
$object->status_buy = 0;
- $object->finished = 1;
$object->id = null;
if ($object->check())
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index dc438d2b929..bb37d9eeeb8 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -1286,7 +1286,6 @@ class Project extends CommonObject
*/
function select_element($Tablename)
{
- global $db;
$projectkey="fk_projet";
switch ($Tablename)
@@ -1316,25 +1315,27 @@ class Project extends CommonObject
}
$sql.= " ORDER BY ref DESC";
- dol_syslog("Project.Lib::select_element sql=".$sql);
+ dol_syslog(get_class($this).'::select_element sql='.$sql,LOG_DEBUG);
- $resql=$db->query($sql);
+ $resql=$this->db->query($sql);
if ($resql)
{
- $num = $db->num_rows($resql);
+ $num = $this->db->num_rows($resql);
$i = 0;
if ($num > 0)
{
$sellist = '';
}
return $sellist ;
+
+ $this->db->free($resql);
}
}
@@ -1347,8 +1348,8 @@ class Project extends CommonObject
*/
function update_element($TableName, $ElementSelectId)
{
- global $db;
- $sql="update ".MAIN_DB_PREFIX.$TableName;
+ $sql="UPDATE ".MAIN_DB_PREFIX.$TableName;
+
if ($TableName=="actioncomm")
{
$sql.= " SET fk_project=".$this->id;
@@ -1359,7 +1360,17 @@ class Project extends CommonObject
$sql.= " SET fk_projet=".$this->id;
$sql.= " WHERE rowid=".$ElementSelectId;
}
- $resql=$db->query($sql);
+
+ dol_syslog(get_class($this)."::update_element sql=" . $sql, LOG_DEBUG);
+ $resql=$this->db->query($sql);
+ if (!$resql) {
+ $this->error=$this->db->lasterror();
+ dol_syslog(get_class($this)."::update_element error : " . $this->error, LOG_ERR);
+ return -1;
+ }else {
+ return 1;
+ }
+
}
}
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index e47c36fa191..3f686bdecaf 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -46,8 +46,10 @@ if (! empty($conf->commande->enabled)) $langs->load("orders");
if (! empty($conf->propal->enabled)) $langs->load("propal");
if (! empty($conf->ficheinter->enabled)) $langs->load("interventions");
-$projectid=GETPOST('id');
-$ref=GETPOST('ref');
+$projectid=GETPOST('id','int');
+$ref=GETPOST('ref','alpha');
+$action=GETPOST('action','alpha');
+
if ($projectid == '' && $ref == '')
{
dol_print_error('','Bad parameter');
@@ -62,6 +64,8 @@ if ($ref)
{
$project->fetch(0,$ref);
$projectid=$project->id;
+}else {
+ $project->fetch($projectid);
}
// Security check
@@ -82,7 +86,7 @@ $form = new Form($db);
$userstatic=new User($db);
$project = new Project($db);
-$project->fetch($_GET["id"],$_GET["ref"]);
+$project->fetch($projectid,$ref);
$project->societe->fetch($project->societe->id);
// To verify role of users
@@ -191,7 +195,10 @@ if ($action=="addelement")
{
$tablename = GETPOST("tablename");
$elementselectid = GETPOST("elementselect");
- $project->update_element($tablename, $elementselectid);
+ $result=$project->update_element($tablename, $elementselectid);
+ if ($result<0) {
+ setEventMessage($mailchimp->error,'errors');
+ }
}
foreach ($listofreferent as $key => $value)
diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php
index 2fecd817b5e..bb03a3ee7af 100644
--- a/htdocs/theme/auguria/style.css.php
+++ b/htdocs/theme/auguria/style.css.php
@@ -2184,25 +2184,65 @@ div.ecmjqft {
/* JMobile */
/* ============================================================================== */
+li.ui-li-divider .ui-link {
+ color: #FFF !important;
+}
+a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-inner:hover {
+ text-decoration: none !important;
+}
+
+.ui-btn-inner {
+ padding-left: 10px;
+ padding-right: 10px;
+ /* white-space: normal; */ /* Warning, enable this break the truncate feature */
+}
+.ui-select .ui-btn-icon-right .ui-btn-inner {
+ padding-right: 36px;
+}
+.fiche .ui-controlgroup {
+ margin: 0px;
+ padding-bottom: 0px;
+}
+div.ui-controlgroup-controls div.tabsElem
+{
+ margin-top: 2px;
+}
+div.ui-controlgroup-controls div.tabsElem a
+{
+ -moz-box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ -webkit-box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ border: none;
+}
+a.tab span.ui-btn-inner
+{
+ border: none;
+ padding: 0;
+}
+
.ui-body-c {
border: none;
text-shadow: none;
}
-
-div.tabsElem a.ui-btn-corner-all {
- -webkit-border-bottom-left-radius: 0px;
- -moz-border-radius-bottomleft: 0px;
- border-bottom-left-radius: 0px;
- -webkit-border-bottom-right-radius: 0px;
- -moz-border-radius-bottomright: 0px;
- border-bottom-right-radius: 0px;
+.ui-link {
+ color: rgb() !important;
}
-.ui-btn-icon-left .ui-icon {
- left: 8px;
+a.ui-link {
+ word-wrap: break-word;
}
-.ui-btn-icon-right .ui-icon {
- right: 8px;
+
+/* force wrap possible onto field overflow does not works */
+.formdoc .ui-btn-inner
+{
+ white-space: normal;
+ overflow: hidden;
+ text-overflow: hidden;
+}
+
+/* Warning: setting this may make screen not beeing refreshed after a combo selection */
+.ui-body-c {
+ background: #fff;
}
div.ui-radio
@@ -2216,6 +2256,7 @@ div.ui-radio
position: static;
}
+
close();
?>
diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php
index 00181336286..9a6fc065dbc 100644
--- a/htdocs/theme/bureau2crea/style.css.php
+++ b/htdocs/theme/bureau2crea/style.css.php
@@ -2372,44 +2372,65 @@ div.ecmjqft {
/* JMobile */
/* ============================================================================== */
+li.ui-li-divider .ui-link {
+ color: #FFF !important;
+}
+a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-inner:hover {
+ text-decoration: none !important;
+}
+
.ui-btn-inner {
padding-left: 10px;
padding-right: 10px;
- white-space: normal;
+ /* white-space: normal; */ /* Warning, enable this break the truncate feature */
}
-
-div.ui-controlgroup
+.ui-select .ui-btn-icon-right .ui-btn-inner {
+ padding-right: 36px;
+}
+.fiche .ui-controlgroup {
+ margin: 0px;
+ padding-bottom: 0px;
+}
+div.ui-controlgroup-controls div.tabsElem
{
- height: auto;
- background-image: none;
+ margin-top: 2px;
}
-
-div.ui-controlgroup-controls div.tabsElem, div.ui-controlgroup-controls div.tabsElem a.tab
+div.ui-controlgroup-controls div.tabsElem a
{
- height: auto;
+ -moz-box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ -webkit-box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ border: none;
}
-
a.tab span.ui-btn-inner
{
border: none;
padding: 0;
}
-div.tabs a.tab#active span.ui-btn-inner, div.tabs a.tab#active span.ui-btn-text, div.tabs a.tab span.ui-btn-inner, div.tabs a.tab span.ui-btn-text {
- background-image: none;
- color: #D45416;
- height: auto;
-}
.ui-body-c {
border: none;
text-shadow: none;
}
-
-.ui-btn-icon-left .ui-icon {
- left: 8px;
+.ui-link {
+ color: rgb() !important;
}
-.ui-btn-icon-right .ui-icon {
- right: 8px;
+
+a.ui-link {
+ word-wrap: break-word;
+}
+
+/* force wrap possible onto field overflow does not works */
+.formdoc .ui-btn-inner
+{
+ white-space: normal;
+ overflow: hidden;
+ text-overflow: hidden;
+}
+
+/* Warning: setting this may make screen not beeing refreshed after a combo selection */
+.ui-body-c {
+ background: #fff;
}
div.ui-radio
diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php
index ec01aef6882..759f4bec951 100644
--- a/htdocs/theme/cameleo/style.css.php
+++ b/htdocs/theme/cameleo/style.css.php
@@ -2281,38 +2281,65 @@ div.ecmjqft {
/* JMobile */
/* ============================================================================== */
-.ui-body-c {
+li.ui-li-divider .ui-link {
+ color: #FFF !important;
+}
+a.ui-link, a.ui-link:hover, .ui-btn:hover, span.ui-btn-text:hover, span.ui-btn-inner:hover {
+ text-decoration: none !important;
+}
+
+.ui-btn-inner {
+ padding-left: 10px;
+ padding-right: 10px;
+ /* white-space: normal; */ /* Warning, enable this break the truncate feature */
+}
+.ui-select .ui-btn-icon-right .ui-btn-inner {
+ padding-right: 36px;
+}
+.fiche .ui-controlgroup {
+ margin: 0px;
+ padding-bottom: 0px;
+}
+div.ui-controlgroup-controls div.tabsElem
+{
+ margin-top: 2px;
+}
+div.ui-controlgroup-controls div.tabsElem a
+{
+ -moz-box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ -webkit-box-shadow: 0 -3px 6px rgba(0,0,0,.2);
+ box-shadow: 0 -3px 6px rgba(0,0,0,.2);
border: none;
- text-shadow: none;
}
-
-div.ui-controlgroup
-{
- height: auto;
- background-image: none;
-}
-
-div.ui-controlgroup-controls div.tabsElem, div.ui-controlgroup-controls div.tabsElem a.tab
-{
- height: auto;
-}
-
a.tab span.ui-btn-inner
{
border: none;
padding: 0;
}
-div.tabs a.tab#active span.ui-btn-inner, div.tabs a.tab#active span.ui-btn-text, div.tabs a.tab span.ui-btn-inner, div.tabs a.tab span.ui-btn-text {
- background-image: none;
- color: #D45416;
- height: auto;
+
+.ui-body-c {
+ border: none;
+ text-shadow: none;
+}
+.ui-link {
+ color: rgb() !important;
}
-.ui-btn-icon-left .ui-icon {
- left: 8px;
+a.ui-link {
+ word-wrap: break-word;
}
-.ui-btn-icon-right .ui-icon {
- right: 8px;
+
+/* force wrap possible onto field overflow does not works */
+.formdoc .ui-btn-inner
+{
+ white-space: normal;
+ overflow: hidden;
+ text-overflow: hidden;
+}
+
+/* Warning: setting this may make screen not beeing refreshed after a combo selection */
+.ui-body-c {
+ background: #fff;
}
div.ui-radio
@@ -2326,6 +2353,7 @@ div.ui-radio
position: static;
}
+
close();
?>
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 9241f4e3a02..583ab86b486 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -903,7 +903,7 @@ font.vsmenudisabled { font-size:px; font-family: ; }
font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; }
-a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #666666; }
+a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:px; font-family: ; text-align: ; font-weight: normal; color: #666666; text-decoration: none; }
div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks