Merge remote-tracking branch 'origin/3.4' into develop
This commit is contained in:
commit
499440be16
@ -138,7 +138,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0)
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_LOGIN_NOT_REQUIRED">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AdherentLoginRequired").'</td><td>';
|
||||
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 '</td><td align="center" width="80">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||
print "</td></tr>\n";
|
||||
|
||||
@ -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."'";
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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())
|
||||
|
||||
@ -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 = '<select class="flat" name="elementselect">';
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
$sellist .='<option value="'.$obj->rowid.'">'.$obj->ref.'</option>';
|
||||
$i++;
|
||||
}
|
||||
$sellist .='</select>';
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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(<?php print $colortext; ?>) !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;
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
if (is_object($db)) $db->close();
|
||||
?>
|
||||
|
||||
@ -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(<?php print $colortext; ?>) !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
|
||||
|
||||
@ -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(<?php print $colortext; ?>) !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;
|
||||
}
|
||||
|
||||
|
||||
<?php
|
||||
if (is_object($db)) $db->close();
|
||||
?>
|
||||
|
||||
@ -903,7 +903,7 @@ font.vsmenudisabled { font-size:<?php print $fontsize ?>px; font-family: <?php p
|
||||
a.vsmenu:link, a.vsmenu:visited { color: #<?php echo $colortextmain; ?>; }
|
||||
font.vsmenudisabledmargin { margin: 1px 1px 1px 8px; }
|
||||
|
||||
a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; }
|
||||
a.help:link, a.help:visited, a.help:hover, a.help:active { font-size:<?php print $fontsizesmaller ?>px; font-family: <?php print $fontlist ?>; text-align: <?php print $left; ?>; font-weight: normal; color: #666666; text-decoration: none; }
|
||||
|
||||
|
||||
div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks
|
||||
|
||||
Loading…
Reference in New Issue
Block a user