Merge remote-tracking branch 'origin/3.4' into develop

Conflicts:
	htdocs/core/lib/pdf.lib.php
	htdocs/public/cron/cron_run_jobs.php
This commit is contained in:
Laurent Destailleur 2013-10-27 02:33:03 +02:00
commit c81bb60384
8 changed files with 22 additions and 13 deletions

View File

@ -1732,8 +1732,8 @@ class Facture extends CommonInvoice
$sql.= " SET facnumber='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; $sql.= " SET facnumber='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'";
if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date
{ {
$sql.= ', datef='.$this->db->idate($this->date); $sql.= ", datef='".$this->db->idate($this->date)."'";
$sql.= ', date_lim_reglement='.$this->db->idate($this->date_lim_reglement); $sql.= ", date_lim_reglement='".$this->db->idate($this->date_lim_reglement)."'";
} }
$sql.= ' WHERE rowid = '.$this->id; $sql.= ' WHERE rowid = '.$this->id;

View File

@ -62,6 +62,10 @@ class Contact extends CommonObject
var $code; var $code;
var $email; var $email;
var $phone_pro;
var $phone_perso;
var $phone_mobile;
var $birthday; var $birthday;
var $default_lang; var $default_lang;
var $note_public; // Public note var $note_public; // Public note

View File

@ -875,7 +875,7 @@ class ExtraFields
if (!empty($value)) { if (!empty($value)) {
$checked=' checked="checked" '; $checked=' checked="checked" ';
} }
$value='<input type="checkbox" '.$checked.' '.($moreparam?$moreparam:'').' readonly="readonly">'; $value='<input type="checkbox" '.$checked.' '.($moreparam?$moreparam:'').' readonly="readonly" disabled="disabled">';
} }
elseif ($type == 'mail') elseif ($type == 'mail')
{ {

View File

@ -345,7 +345,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target
if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS)) if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS))
{ {
// Tel // Tel
if ($targetcontact->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone); if ($targetcontact->phone_pro) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone_pro);
// Fax // Fax
if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax); if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax);
// EMail // EMail

View File

@ -56,8 +56,9 @@ $langs->load("cron");
*/ */
// Check the key, avoid that a stranger starts cron // Check the key, avoid that a stranger starts cron
$key = $_GET['securitykey']; $key = GETPOST('securitykey','alpha');
if (empty($key)) { if (empty($key))
{
echo 'securitykey is require'; echo 'securitykey is require';
exit; exit;
} }
@ -67,7 +68,7 @@ if($key != $conf->global->CRON_KEY)
exit; exit;
} }
// Check the key, avoid that a stranger starts cron // Check the key, avoid that a stranger starts cron
$userlogin = GETPOST('userlogin'); $userlogin = GETPOST('userlogin','alpha');
if (empty($userlogin)) if (empty($userlogin))
{ {
echo 'userlogin is require'; echo 'userlogin is require';
@ -91,7 +92,8 @@ else
exit; exit;
} }
} }
$id = GETPOST('id'); $id = GETPOST('id','int');
// create a jobs object // create a jobs object
$object = new Cronjob($db); $object = new Cronjob($db);

View File

@ -4,7 +4,7 @@
print '<table width="100%" class="nobordernopadding"><tr><td>'; print '<table width="100%" class="nobordernopadding"><tr><td>';
print $langs->trans('SalesRepresentatives'); print $langs->trans('SalesRepresentatives');
print '<td><td align="right">'; print '<td><td align="right">';
if ($user->rights->societe->creer) if ($user->rights->societe->creer && $user->rights->societe->client->voir)
print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$object->id.'">'.img_edit().'</a>'; print '<a href="'.DOL_URL_ROOT.'/societe/commerciaux.php?socid='.$object->id.'">'.img_edit().'</a>';
else else
print '&nbsp;'; print '&nbsp;';

View File

@ -102,6 +102,7 @@ print '<br><br>';
$webservices = array( $webservices = array(
'user' => '', 'user' => '',
'thirdparty' => '!empty($conf->societe->enabled)', 'thirdparty' => '!empty($conf->societe->enabled)',
'contact' => '!empty($conf->societe->enabled)',
'productorservice' => '(!empty($conf->product->enabled) || !empty($conf->service->enabled))', 'productorservice' => '(!empty($conf->product->enabled) || !empty($conf->service->enabled))',
'order' => '!empty($conf->commande->enabled)', 'order' => '!empty($conf->commande->enabled)',
'invoice' => '!empty($conf->facture->enabled)', 'invoice' => '!empty($conf->facture->enabled)',

View File

@ -300,7 +300,7 @@ function getContact($authentication,$id,$ref='',$ref_ext='')
'ref_propal' => $contact->ref_propal, 'ref_propal' => $contact->ref_propal,
'user_id' => $contact->user_id, 'user_id' => $contact->user_id,
'user_login' => $contact->user_login, 'user_login' => $contact->user_login,
'civility_id' => $contact->civility_id 'civilite_id' => $contact->civility_id
); );
//Retreive all extrafield for thirdsparty //Retreive all extrafield for thirdsparty
@ -379,7 +379,7 @@ function createContact($authentication,$contact)
$newobject=new Contact($db); $newobject=new Contact($db);
$newobject->id=$contact['id']; $newobject->id=$contact['id'];
$newobject->civility_id=$contact['civility_id']; $newobject->civilite_id=$contact['civility_id'];
$newobject->lastname=$contact['lastname']; $newobject->lastname=$contact['lastname'];
$newobject->firstname=$contact['firstname']; $newobject->firstname=$contact['firstname'];
$newobject->address=$contact['address']; $newobject->address=$contact['address'];
@ -522,7 +522,7 @@ function getContactsForThirdParty($authentication,$idthirdparty)
$linescontact[]=array( $linescontact[]=array(
'id' => $contact->id, 'id' => $contact->id,
'ref' => $contact->ref, 'ref' => $contact->ref,
'civility_id' => $contact->civility_id?$contact->civility_id:'', 'civility_id' => $contact->civilite_id?$contact->civilite_id:'',
'lastname' => $contact->lastname?$contact->lastname:'', 'lastname' => $contact->lastname?$contact->lastname:'',
'firstname' => $contact->firstname?$contact->firstname:'', 'firstname' => $contact->firstname?$contact->firstname:'',
'address' => $contact->address?$contact->address:'', 'address' => $contact->address?$contact->address:'',
@ -653,6 +653,8 @@ function updateContact($authentication,$contact)
$object->fax=$contact['fax']; $object->fax=$contact['fax'];
$object->email=$contact['email']; $object->email=$contact['email'];
$object->civilite_id=$contact['civility_id'];
//Retreive all extrafield for contact //Retreive all extrafield for contact
// fetch optionals attributes and labels // fetch optionals attributes and labels