Merge remote-tracking branch 'origin/3.7' into develop
Conflicts: htdocs/comm/action/class/actioncomm.class.php htdocs/core/class/commonobject.class.php
This commit is contained in:
commit
414404e854
@ -747,6 +747,9 @@ if ($action == 'create')
|
||||
}
|
||||
if(!empty($origin) && !empty($originid))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
print '<tr><td>'.$langs->trans("LinkedObject").'</td>';
|
||||
print '<td colspan="3">'.dolGetElementUrl($originid,$origin,1).'</td></tr>';
|
||||
print '<input type="hidden" name="fk_element" size="10" value="'.GETPOST('originid').'">';
|
||||
print '<input type="hidden" name="elementtype" size="10" value="'.GETPOST('origin').'">';
|
||||
}
|
||||
|
||||
@ -211,13 +211,16 @@ class ActionComm extends CommonObject
|
||||
if ($this->elementtype=='commande') $this->elementtype='order';
|
||||
if ($this->elementtype=='contrat') $this->elementtype='contract';
|
||||
|
||||
if (! is_array($this->userassigned)) // For backward compatibility
|
||||
if (! is_array($this->userassigned) && ! empty($this->userassigned)) // For backward compatibility
|
||||
{
|
||||
$tmpid=$this->userassigned;
|
||||
$this->userassigned=array();
|
||||
$this->userassigned[$tmpid]=array('id'=>$tmpid);
|
||||
}
|
||||
|
||||
if (is_object($this->contact) && $this->contact->id > 0 && ! ($this->contactid > 0)) $this->contactid = $this->contact->id; // For backward compatibility. Using this->contact->xx is deprecated
|
||||
|
||||
|
||||
$userownerid=$this->userownerid;
|
||||
$userdoneid=$this->userdoneid;
|
||||
|
||||
@ -282,13 +285,13 @@ class ActionComm extends CommonObject
|
||||
$sql.= "'".$this->db->idate($now)."',";
|
||||
$sql.= (strval($this->datep)!=''?"'".$this->db->idate($this->datep)."'":"null").",";
|
||||
$sql.= (strval($this->datef)!=''?"'".$this->db->idate($this->datef)."'":"null").",";
|
||||
$sql.= (isset($this->durationp) && $this->durationp >= 0 && $this->durationp != ''?"'".$this->durationp."'":"null").","; // deprecated
|
||||
$sql.= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '')?"'".$this->durationp."'":"null").","; // deprecated
|
||||
$sql.= (isset($this->type_id)?$this->type_id:"null").",";
|
||||
$sql.= (isset($this->type_code)?" '".$this->type_code."'":"null").",";
|
||||
$sql.= (isset($this->socid) && $this->socid > 0?" '".$this->socid."'":"null").",";
|
||||
$sql.= (isset($this->fk_project) && $this->fk_project > 0?" '".$this->fk_project."'":"null").",";
|
||||
$sql.= ((isset($this->socid) && $this->socid > 0)?" '".$this->socid."'":"null").",";
|
||||
$sql.= ((isset($this->fk_project) && $this->fk_project > 0)?" '".$this->fk_project."'":"null").",";
|
||||
$sql.= " '".$this->db->escape($this->note)."',";
|
||||
$sql.= (isset($this->contactid) && $this->contactid > 0?"'".$this->contactid."'":"null").",";
|
||||
$sql.= ((isset($this->contactid) && $this->contactid > 0)?"'".$this->contactid."'":"null").",";
|
||||
$sql.= (isset($user->id) && $user->id > 0 ? "'".$user->id."'":"null").",";
|
||||
$sql.= ($userownerid>0?"'".$userownerid."'":"null").",";
|
||||
$sql.= ($userdoneid>0?"'".$userdoneid."'":"null").",";
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012-2013 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||
* Copyright (C) 2011-2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012-2015 Marcos García <marcosgdf@gmail.com>
|
||||
@ -47,21 +47,6 @@ abstract class CommonObject
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* @var string[] Array of error strings
|
||||
*/
|
||||
public $errors=array();
|
||||
|
||||
/**
|
||||
* @var string Can be used to pass information when only object is provied to method
|
||||
*/
|
||||
public $context=array();
|
||||
|
||||
/**
|
||||
* @var string Contains canvas name if record is an alternative canvas record
|
||||
*/
|
||||
public $canvas;
|
||||
|
||||
/**
|
||||
* @var string Key value used to track if data is coming from import wizard
|
||||
*/
|
||||
@ -89,7 +74,23 @@ abstract class CommonObject
|
||||
|
||||
|
||||
|
||||
// Following var are used by some objects only. We keep this property here in CommonObject to be able to provide common method using them.
|
||||
// Following vars are used by some objects only. We keep this property here in CommonObject to be able to provide common method using them.
|
||||
|
||||
/**
|
||||
* @var string[] Array of error strings
|
||||
*/
|
||||
public $errors=array();
|
||||
|
||||
/**
|
||||
* @var string Can be used to pass information when only object is provided to method
|
||||
*/
|
||||
public $context=array();
|
||||
|
||||
/**
|
||||
* @var string Contains canvas name if record is an alternative canvas record
|
||||
*/
|
||||
public $canvas;
|
||||
|
||||
|
||||
public $name;
|
||||
public $lastname;
|
||||
|
||||
@ -207,8 +207,9 @@ UPDATE llx_product SET fk_barcode_type = NULL WHERE fk_barcode_type NOT IN (SELE
|
||||
-- fk_user_author
|
||||
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_user_author (fk_user_author);
|
||||
UPDATE llx_product_price set fk_user_author = null where fk_user_author = 0;
|
||||
UPDATE llx_product_price set fk_user_author = null where fk_user_author not in (select rowid from llx_user);
|
||||
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid);
|
||||
-- fk_user_author
|
||||
-- fk_product
|
||||
ALTER TABLE llx_product_price ADD INDEX idx_product_price_fk_product (fk_product);
|
||||
DELETE from llx_product_price where fk_product NOT IN (SELECT rowid from llx_product);
|
||||
ALTER TABLE llx_product_price ADD CONSTRAINT fk_product_price_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid);
|
||||
|
||||
@ -398,7 +398,7 @@ ExtrafieldParamHelpsellist=Parameters list comes from a table<br>Syntax : table_
|
||||
ExtrafieldParamHelpchkbxlst=Parameters list comes from a table<br>Syntax : table_name:label_field:id_field::filter<br>Example : c_typent:libelle:id::filter<br><br>filter can be a simple test (eg active=1) to display only active value <br> if you want to filter on extrafields use syntaxt extra.fieldcode=... (where field code is the code of extrafield)<br><br>In order to have the list depending on another :<br>c_typent:libelle:id:parent_list_code|parent_column:filter
|
||||
LibraryToBuildPDF=Library used to build PDF
|
||||
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
|
||||
LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:<br>1 : local tax apply on products and services without vat (localtax is calculated on amount without tax)<br>2 : local tax apply on products and services including vat (localtax is calculated on amount + main tax)<br>3 : local tax apply on products without vat (localtax is calculated on amount without tax)<br>4 : local tax apply on products including vat (vat is calculated on amount + main vat)<br>5 : local tax apply on services without vat (localtax is calculated on amount without tax)<br>6 : local tax apply on services including vat (localtax is calculated on amount + tax)
|
||||
LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are:<br>1 : local tax apply on products and services without vat (localtax is calculated on amount without tax)<br>2 : local tax apply on products and services including vat (localtax is calculated on amount + main tax)<br>3 : local tax apply on products without vat (localtax is calculated on amount without tax)<br>4 : local tax apply on products including vat (localtax is calculated on amount + main vat)<br>5 : local tax apply on services without vat (localtax is calculated on amount without tax)<br>6 : local tax apply on services including vat (localtax is calculated on amount + tax)
|
||||
SMS=SMS
|
||||
LinkToTestClickToDial=Enter a phone number to call to show a link to test the ClickToDial url for user <strong>%s</strong>
|
||||
RefreshPhoneLink=Refresh link
|
||||
|
||||
@ -1177,7 +1177,7 @@ else
|
||||
print_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), "");
|
||||
|
||||
// Main official, simple, and not duplicated code
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST">'."\n";
|
||||
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
|
||||
@ -351,7 +351,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
|
||||
print '</form>';
|
||||
|
||||
}
|
||||
else
|
||||
else if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
/*
|
||||
* Fiche projet en mode visu
|
||||
|
||||
@ -392,10 +392,13 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td class="nowrap">';
|
||||
print img_object('','user','class="hideonsmartphone"');
|
||||
$contactsoftask=$object->getListContactId('internal');
|
||||
if (count($contactsoftask)>0) {
|
||||
if (count($contactsoftask)>0)
|
||||
{
|
||||
$userid=$contactsoftask[0];
|
||||
print $form->select_dolusers($userid,'userid',0,'',0,'',$contactsoftask);
|
||||
}else {
|
||||
print $form->select_dolusers((GETPOST('userid')?GETPOST('userid'):$userid),'userid',0,'',0,'',$contactsoftask);
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime');
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user