Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2017-02-12 20:51:52 +01:00
commit cda301f6b7
7 changed files with 83 additions and 78 deletions

View File

@ -636,7 +636,8 @@ foreach ($skeletonfiles as $skeletonfile => $outfile)
{ {
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{ {
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td><input class=\"flat\" type=\"text\" name=\"".$prop['field']."\" value=\"'.\$object->".$prop['field'].".'\"></td></tr>';\n"; $baseString = 'print "<tr><td class=\"fieldrequired\">".\$langs->trans("Field%s")."</td><td><input class=\"flat\" type=\"text\" name=\"%s\" value=\"".$object->%s."\"></td></tr>";';
$varprop.= sprintf("\t ".$baseString." \n", $prop['field'], $prop['field'], $prop['field']);
} }
} }
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_EDIT/', $varprop, $targetcontent); $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_EDIT/', $varprop, $targetcontent);
@ -648,7 +649,7 @@ foreach ($skeletonfiles as $skeletonfile => $outfile)
{ {
if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime']) if ($prop['field'] != 'rowid' && $prop['field'] != 'id' && ! $prop['istime'])
{ {
$varprop.="print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field".$prop['field']."\").'</td><td>\$object->".$prop['field']."</td></tr>';\n"; $varprop.=sprintf("\t print '<tr><td class=\"fieldrequired\">'.\$langs->trans(\"Field%s\").'</td><td>'.\$object->%s.'</td></tr>';\n",$prop['field'],$prop['field']);
} }
} }
$targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent); $targetcontent=preg_replace('/LIST_OF_TD_LABEL_FIELDS_VIEW/', $varprop, $targetcontent);

View File

@ -1487,7 +1487,8 @@ if ($id)
$canbemodified=$iserasable; $canbemodified=$iserasable;
if ($obj->code == 'RECEP') $canbemodified=1; if ($obj->code == 'RECEP') $canbemodified=1;
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):''); $rowidcol=$tabrowid[$id];
$url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->{$rowidcol})?$obj->{$rowidcol}:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?urlencode($obj->code):'');
if ($param) $url .= '&'.$param; if ($param) $url .= '&'.$param;
$url.='&'; $url.='&';

View File

@ -22,14 +22,14 @@
*/ */
class Auth class Auth
{ {
var $db; protected $db;
var $login; private $login;
var $passwd; private $passwd;
var $reponse; private $reponse;
var $sqlQuery; public $sqlQuery;
/** /**
* Enter description here ... * Enter description here ...
@ -37,7 +37,7 @@ class Auth
* @param DoliDB $db Database handler * @param DoliDB $db Database handler
* @return void * @return void
*/ */
function __construct($db) public function __construct($db)
{ {
$this->db = $db; $this->db = $db;
$this->reponse(null); $this->reponse(null);
@ -49,7 +49,7 @@ class Auth
* @param string $aLogin Login * @param string $aLogin Login
* @return void * @return void
*/ */
function login($aLogin) public function login($aLogin)
{ {
$this->login = $aLogin; $this->login = $aLogin;
} }
@ -71,7 +71,7 @@ class Auth
* @param string $aReponse Response * @param string $aReponse Response
* @return void * @return void
*/ */
function reponse($aReponse) public function reponse($aReponse)
{ {
$this->reponse = $aReponse; $this->reponse = $aReponse;
} }
@ -83,7 +83,7 @@ class Auth
* @param string $aPasswd Password * @param string $aPasswd Password
* @return int 0 or 1 * @return int 0 or 1
*/ */
function verif($aLogin, $aPasswd) public function verif($aLogin, $aPasswd)
{ {
global $conf,$langs; global $conf,$langs;
global $dolibarr_main_authentication,$dolibarr_auto_user; global $dolibarr_main_authentication,$dolibarr_auto_user;

View File

@ -29,15 +29,15 @@ $langs->load("bills");
<script type="text/javascript"> <script type="text/javascript">
function popupTicket() function popupTicket(id,name)
{ {
largeur = 600; largeur = 600;
hauteur = 500; hauteur = 500;
opt = 'width='+largeur+', height='+hauteur+', left='+(screen.width - largeur)/2+', top='+(screen.height-hauteur)/2+''; opt = 'width='+largeur+', height='+hauteur+', left='+(screen.width - largeur)/2+', top='+(screen.height-hauteur)/2+'';
window.open('validation_ticket.php?facid=<?php echo GETPOST('facid','int'); ?>', '<?php echo $langs->trans('PrintTicket') ?>', opt); window.open('validation_ticket.php?facid='+id,name, opt);
} }
popupTicket(); popupTicket(<?php echo GETPOST('facid','int'); ?>,'<?php echo $langs->trans('PrintTicket') ?>');
</script> </script>

View File

@ -41,61 +41,61 @@ class Contact extends CommonObject
public $table_element='socpeople'; public $table_element='socpeople';
protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe protected $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $civility_id; // In fact we store civility_code public $civility_id; // In fact we store civility_code
var $civility_code; public $civility_code;
var $address; public $address;
var $zip; public $zip;
var $town; public $town;
/** /**
* @deprecated * @deprecated
* @see state_id * @see state_id
*/ */
var $fk_departement; public $fk_departement;
/** /**
* @deprecated * @deprecated
* @see state_code * @see state_code
*/ */
var $departement_code; public $departement_code;
/** /**
* @deprecated * @deprecated
* @see state * @see state
*/ */
var $departement; public $departement;
var $state_id; // Id of department public $state_id; // Id of department
var $state_code; // Code of department public $state_code; // Code of department
var $state; // Label of department public $state; // Label of department
var $poste; // Position public $poste; // Position
var $socid; // fk_soc public $socid; // fk_soc
var $statut; // 0=inactif, 1=actif public $statut; // 0=inactif, 1=actif
var $code; public $code;
var $email; public $email;
var $skype; public $skype;
var $photo; public $photo;
var $jabberid; public $jabberid;
var $phone_pro; public $phone_pro;
var $phone_perso; public $phone_perso;
var $phone_mobile; public $phone_mobile;
var $fax; public $fax;
var $priv; public $priv;
var $birthday; public $birthday;
var $default_lang; public $default_lang;
var $no_email; // 1=Don't send e-mail to this contact, 0=do public $no_email; // 1=Don't send e-mail to this contact, 0=do
var $ref_facturation; // Nb de reference facture pour lequel il est contact public $ref_facturation; // Reference number of invoice for which it is contact
var $ref_contrat; // Nb de reference contrat pour lequel il est contact public $ref_contrat; // Nb de reference contrat pour lequel il est contact
var $ref_commande; // Nb de reference commande pour lequel il est contact public $ref_commande; // Nb de reference commande pour lequel il est contact
var $ref_propal; // Nb de reference propal pour lequel il est contact public $ref_propal; // Nb de reference propal pour lequel il est contact
var $user_id; public $user_id;
var $user_login; public $user_login;
var $oldcopy; // To contains a clone of this when we need to save old properties of object public $oldcopy; // To contains a clone of this when we need to save old properties of object
/** /**

View File

@ -2346,8 +2346,11 @@ class CommandeFournisseur extends CommonOrder
$subprice = price2num($pu_ht,'MU'); $subprice = price2num($pu_ht,'MU');
//Fetch current line from the database and then clone the object and set it in $oldline property
$this->line=new CommandeFournisseurLigne($this->db); $this->line=new CommandeFournisseurLigne($this->db);
$this->line->fetch($rowid); $this->line->fetch($rowid);
$oldline = clone $this->line;
$this->line->oldline = $oldline;
$this->line->context = $this->context; $this->line->context = $this->context;

View File

@ -31,21 +31,21 @@
*/ */
class Address class Address
{ {
var $db; protected $db;
var $id; public $id;
var $type; public $type;
var $label; public $label;
var $socid; public $socid;
var $name; public $name;
var $address; public $address;
var $zip; public $zip;
var $town; public $town;
var $country_id; public $country_id;
var $country_code; public $country_code;
var $phone; public $phone;
var $fax; public $fax;
var $note; public $note;
/** /**
* Adresses liees a la societe * Adresses liees a la societe
@ -495,21 +495,21 @@ class Address
*/ */
class AddressLine class AddressLine
{ {
protected $db;
var $id; public $id;
var $date_creation; public $date_creation;
var $date_modification; public $date_modification;
var $label; public $label;
var $name; public $name;
var $address; public $address;
var $zip; public $zip;
var $town; public $town;
var $country_id; public $country_id;
var $country_code; public $country_code;
var $country; public $country;
var $phone; public $phone;
var $fax; public $fax;
var $note; public $note;
/** /**