Merge remote-tracking branch 'upstream/7.0' into 7.0
This commit is contained in:
commit
cf64053fa5
@ -840,7 +840,7 @@ if (empty($action) || $action == 'view') {
|
|||||||
|
|
||||||
|
|
||||||
// Test that setup is complete
|
// Test that setup is complete
|
||||||
$sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL';
|
$sql = 'SELECT COUNT(rowid) as nb FROM '.MAIN_DB_PREFIX.'bank_account WHERE fk_accountancy_journal IS NULL AND clos=0';
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -582,13 +582,14 @@ class Adherent extends CommonObject
|
|||||||
$lthirdparty->phone=$this->phone;
|
$lthirdparty->phone=$this->phone;
|
||||||
$lthirdparty->state_id=$this->state_id;
|
$lthirdparty->state_id=$this->state_id;
|
||||||
$lthirdparty->country_id=$this->country_id;
|
$lthirdparty->country_id=$this->country_id;
|
||||||
$lthirdparty->country_id=$this->country_id;
|
|
||||||
//$lthirdparty->phone_mobile=$this->phone_mobile;
|
//$lthirdparty->phone_mobile=$this->phone_mobile;
|
||||||
|
|
||||||
$result=$lthirdparty->update($this->fk_soc,$user,0,1,1,'update'); // Use sync to 0 to avoid cyclic updates
|
$result=$lthirdparty->update($this->fk_soc, $user, 0, 1, 1, 'update'); // Use sync to 0 to avoid cyclic updates
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$this->error=$lthirdparty->error;
|
$this->error=$lthirdparty->error;
|
||||||
|
$this->errors=$lthirdparty->errors;
|
||||||
dol_syslog(get_class($this)."::update ".$this->error,LOG_ERR);
|
dol_syslog(get_class($this)."::update ".$this->error,LOG_ERR);
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,7 +120,7 @@ if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights
|
|||||||
{
|
{
|
||||||
// Creation user
|
// Creation user
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
$result=$company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha'));
|
$result=$company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha'), GETPOST('customercode', 'alpha'));
|
||||||
|
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
@ -1011,6 +1011,15 @@ if ($rowid > 0)
|
|||||||
array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"'),
|
array('label' => $langs->trans("NameToCreate"), 'type' => 'text', 'name' => 'companyname', 'value' => $companyname, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"'),
|
||||||
array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"')
|
array('label' => $langs->trans("AliasNames"), 'type' => 'text', 'name' => 'companyalias', 'value' => $companyalias, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"')
|
||||||
);
|
);
|
||||||
|
// If customer code was forced to "required", we ask it at creation to avoid error later
|
||||||
|
if (! empty($conf->global->MAIN_COMPANY_CODE_ALWAYS_REQUIRED))
|
||||||
|
{
|
||||||
|
$tmpcompany = new Societe($db);
|
||||||
|
$tmpcompany->name=$companyname;
|
||||||
|
$customercode = $tmpcompany->get_codeclient($tmpcompany,0);
|
||||||
|
$formquestion[]=array('label' => $langs->trans("CustomerCode"), 'type' => 'text', 'name' => 'customercode', 'value' => $customercode, 'morecss' => 'minwidth300', 'moreattr' => 'maxlength="128"');
|
||||||
|
}
|
||||||
|
// @TODO Add other extrafields mandatory for thirdparty creation
|
||||||
|
|
||||||
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
print $form->formconfirm($_SERVER["PHP_SELF"]."?rowid=".$object->id,$langs->trans("CreateDolibarrThirdParty"),$langs->trans("ConfirmCreateThirdParty"),"confirm_create_thirdparty",$formquestion,1);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4579,6 +4579,7 @@ abstract class CommonObject
|
|||||||
if ($this->array_options[$key] === '') $mandatorypb=true;
|
if ($this->array_options[$key] === '') $mandatorypb=true;
|
||||||
if ($mandatorypb)
|
if ($mandatorypb)
|
||||||
{
|
{
|
||||||
|
dol_syslog($this->error);
|
||||||
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
|
$this->errors[]=$langs->trans('ErrorFieldRequired', $attributeLabel);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1355,7 +1355,7 @@ class Form
|
|||||||
$out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
|
$out .= ajax_combobox($htmlid, $events, $conf->global->CONTACT_USE_SEARCH_TO_SELECT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($htmlname != 'none' || $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.'" '.(!empty($moreparam) ? $moreparam : '').'>';
|
if ($htmlname != 'none' && ! $options_only) $out.= '<select class="flat'.($moreclass?' '.$moreclass:'').'" id="'.$htmlid.'" name="'.$htmlname.'" '.(!empty($moreparam) ? $moreparam : '').'>';
|
||||||
if ($showempty == 1) $out.= '<option value="0"'.($selected=='0'?' selected':'').'> </option>';
|
if ($showempty == 1) $out.= '<option value="0"'.($selected=='0'?' selected':'').'> </option>';
|
||||||
if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans("Internal").'</option>';
|
if ($showempty == 2) $out.= '<option value="0"'.($selected=='0'?' selected':'').'>'.$langs->trans("Internal").'</option>';
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
@ -1417,7 +1417,7 @@ class Form
|
|||||||
{
|
{
|
||||||
$out.= '<option value="-1"'.($showempty==2?'':' selected').' disabled>'.$langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined").'</option>';
|
$out.= '<option value="-1"'.($showempty==2?'':' selected').' disabled>'.$langs->trans($socid?"NoContactDefinedForThirdParty":"NoContactDefined").'</option>';
|
||||||
}
|
}
|
||||||
if ($htmlname != 'none' || $options_only)
|
if ($htmlname != 'none' && ! $options_only)
|
||||||
{
|
{
|
||||||
$out.= '</select>';
|
$out.= '</select>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -589,8 +589,8 @@ class FormCompany
|
|||||||
runJsCodeForEvent'.$htmlname.'(values);
|
runJsCodeForEvent'.$htmlname.'(values);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* Clean contact */
|
|
||||||
$("div#s2id_contactid>a>span").html(\'\');
|
$(this).trigger("blur");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Function used to execute events when search_htmlname change
|
// Function used to execute events when search_htmlname change
|
||||||
|
|||||||
@ -149,6 +149,7 @@ class pdf_ban extends ModeleBankAccountDoc
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -158,6 +158,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -129,6 +129,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -251,6 +251,7 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -176,6 +176,7 @@ class pdf_strato extends ModelePDFContract
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -163,6 +163,7 @@ class pdf_merou extends ModelePdfExpedition
|
|||||||
$heightforinfotot = 0; // Height reserved to output the info and total part
|
$heightforinfotot = 0; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -225,6 +225,7 @@ class pdf_rouget extends ModelePdfExpedition
|
|||||||
$heightforinfotot = 8; // Height reserved to output the info and total part
|
$heightforinfotot = 8; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -205,6 +205,7 @@ class pdf_standard extends ModeleExpenseReport
|
|||||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -268,6 +268,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part
|
$heightforinfotot = 50+(4*$nbpayments); // Height reserved to output the info and total part and payment part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -166,6 +166,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -195,6 +195,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$heightforinfotot = 30; // Height reserved to output the info and total part
|
$heightforinfotot = 30; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class modAccounting extends DolibarrModules
|
|||||||
"MAIN_COMPANY_CODE_ALWAYS_REQUIRED",
|
"MAIN_COMPANY_CODE_ALWAYS_REQUIRED",
|
||||||
"chaine",
|
"chaine",
|
||||||
"1",
|
"1",
|
||||||
"With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 0
|
"With this constants on, third party code is always required whatever is numbering module behaviour", 0, 'current', 1
|
||||||
);
|
);
|
||||||
$this->const[2] = array(
|
$this->const[2] = array(
|
||||||
"MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED",
|
"MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED",
|
||||||
|
|||||||
@ -195,6 +195,7 @@ class pdf_standard extends ModelePDFProduct
|
|||||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -154,6 +154,7 @@ class pdf_baleine extends ModelePDFProjects
|
|||||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -172,6 +172,7 @@ class pdf_beluga extends ModelePDFProjects
|
|||||||
$heightforinfotot = 40; // Height reserved to output the info and total part
|
$heightforinfotot = 40; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -330,6 +330,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0;
|
$heightforsignature = empty($conf->global->PROPAL_DISABLE_SIGNATURE)?(pdfGetHeightForHtmlContent($pdf, $outputlangs->transnoentities("ProposalCustomerSignature"))+10):0;
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
||||||
|
|
||||||
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||||
|
|||||||
@ -211,6 +211,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -261,6 +261,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -217,6 +217,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -239,6 +239,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||||||
$heightforinfotot = 50; // Height reserved to output the info and total part
|
$heightforinfotot = 50; // Height reserved to output the info and total part
|
||||||
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
$heightforfreetext= (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT)?$conf->global->MAIN_PDF_FREETEXT_HEIGHT:5); // Height reserved to output the free text on last page
|
||||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||||
|
if ($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS >0) $heightforfooter+= 6;
|
||||||
$pdf->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
|
|
||||||
if (class_exists('TCPDF'))
|
if (class_exists('TCPDF'))
|
||||||
|
|||||||
@ -436,9 +436,10 @@ class InterfaceLdapsynchro extends DolibarrTriggers
|
|||||||
// For member type
|
// For member type
|
||||||
if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1')
|
if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1')
|
||||||
{
|
{
|
||||||
$membertype=new AdherentType($this->db);
|
|
||||||
if ($object->typeid > 0)
|
if ($object->typeid > 0)
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php";
|
||||||
|
$membertype=new AdherentType($this->db);
|
||||||
$membertype->fetch($object->typeid);
|
$membertype->fetch($object->typeid);
|
||||||
$membertype->listMembersForMemberType();
|
$membertype->listMembersForMemberType();
|
||||||
|
|
||||||
@ -555,6 +556,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers
|
|||||||
// For member type
|
// For member type
|
||||||
if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1')
|
if (! empty($conf->global->LDAP_MEMBER_TYPE_ACTIVE) && (string) $conf->global->LDAP_MEMBER_TYPE_ACTIVE == '1')
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Change member info
|
* Change member info
|
||||||
*/
|
*/
|
||||||
@ -679,6 +682,8 @@ class InterfaceLdapsynchro extends DolibarrTriggers
|
|||||||
{
|
{
|
||||||
if ($object->typeid > 0)
|
if ($object->typeid > 0)
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove member in member type
|
* Remove member in member type
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1440,7 +1440,7 @@ if ((empty($conf->global->PRODUIT_CUSTOMER_PRICES) || $action=='showlog_default_
|
|||||||
|
|
||||||
// Il doit au moins y avoir la ligne de prix initial.
|
// Il doit au moins y avoir la ligne de prix initial.
|
||||||
// On l'ajoute donc pour remettre a niveau (pb vieilles versions)
|
// On l'ajoute donc pour remettre a niveau (pb vieilles versions)
|
||||||
$object->updatePrice($object->price, $object->price_base_type, $user, $newprice_min);
|
$object->updatePrice($object->price, $object->price_base_type, $user, $object->tva_tx, $object->price_min);
|
||||||
|
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
|
|||||||
@ -3082,9 +3082,10 @@ class Societe extends CommonObject
|
|||||||
* @param Adherent $member Object member
|
* @param Adherent $member Object member
|
||||||
* @param string $socname Name of third party to force
|
* @param string $socname Name of third party to force
|
||||||
* @param string $socalias Alias name of third party to force
|
* @param string $socalias Alias name of third party to force
|
||||||
|
* @param string $customercode Customer code
|
||||||
* @return int <0 if KO, id of created account if OK
|
* @return int <0 if KO, id of created account if OK
|
||||||
*/
|
*/
|
||||||
function create_from_member(Adherent $member, $socname='', $socalias='')
|
function create_from_member(Adherent $member, $socname='', $socalias='', $customercode='')
|
||||||
{
|
{
|
||||||
global $user,$langs;
|
global $user,$langs;
|
||||||
|
|
||||||
@ -3107,7 +3108,7 @@ class Societe extends CommonObject
|
|||||||
$this->skype=$member->skype;
|
$this->skype=$member->skype;
|
||||||
|
|
||||||
$this->client = 1; // A member is a customer by default
|
$this->client = 1; // A member is a customer by default
|
||||||
$this->code_client = -1;
|
$this->code_client = ($customercode?$customercode:-1);
|
||||||
$this->code_fournisseur = -1;
|
$this->code_fournisseur = -1;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|||||||
@ -602,7 +602,7 @@ if (empty($reshook)) {
|
|||||||
$trigger_name='USER_SENTBYMAIL';
|
$trigger_name='USER_SENTBYMAIL';
|
||||||
$paramname='id'; // Name of param key to open the card
|
$paramname='id'; // Name of param key to open the card
|
||||||
$mode='emailfromuser';
|
$mode='emailfromuser';
|
||||||
$trackid='use'.$object->id;
|
$trackid='use'.$id;
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
|
||||||
|
|
||||||
// Actions to build doc
|
// Actions to build doc
|
||||||
@ -1183,7 +1183,7 @@ else
|
|||||||
|
|
||||||
// Check if user has rights
|
// Check if user has rights
|
||||||
$object->getrights();
|
$object->getrights();
|
||||||
if (empty($object->nb_rights) && $object->statut != 0) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
if (empty($object->nb_rights) && $object->statut != 0 && empty($object->admin)) setEventMessages($langs->trans('UserHasNoPermissions'), null, 'warnings');
|
||||||
|
|
||||||
// Connexion ldap
|
// Connexion ldap
|
||||||
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
// pour recuperer passDoNotExpire et userChangePassNextLogon
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user