$socid = GETPOST('socid','int');
if (! empty($user->societe_id)) $socid=$user->societe_id;
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
// Margin Rate
if (! empty($conf->global->DISPLAY_MARGIN_RATES)) {
// Mark Rate
if (! empty($conf->global->DISPLAY_MARK_RATES)) {
print_liste_field_titre($langs->trans("Margin"),$_SERVER["PHP_SELF"],"marge","","&socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print_liste_field_titre($langs->trans("MarginRate"),$_SERVER["PHP_SELF"],"","","&socid=".$_REQUEST["socid"],'align="right"',$sortfield,$sortorder);
if (! empty($conf->global->DISPLAY_MARK_RATES))
print "<td align=\"right\">".price($objp->marge)."</td>\n";
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
print "<td align=\"right\">".(($marginRate === '')?'n/a':price($marginRate)."%")."</td>\n";
if (! empty($conf->global->DISPLAY_MARK_RATES))
if ($p_filedescr['filename'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
if ($p_filedescr['new_short_name'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'");
if ($p_filedescr['new_full_name'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'");
// ----- Look if the archive exists or is empty
// ----- Skip empty file names
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
// ----- Look for empty stored filename
if ($v_result) {
// ----- Skip all the empty items
if ($p_filedescr['filename'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
if ($p_filedescr['new_short_name'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'");
if ($p_filedescr['new_full_name'] == '') {
PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'");
// ----- Look if the archive exists or is empty
// ----- Skip empty file names
// ----- Error log
PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
// ----- Look for empty stored filename
if ($v_result) {
// ----- Skip all the empty items
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
// Module Adherent
if (! empty($conf->adherent->enabled))
*/
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
// Add action
if (! empty($conf->agenda->enabled) && ! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
if (! empty($conf->global->MAIN_REPEATCONTACTONEACHTAB))
// Addresses list
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) && ! empty($conf->global->MAIN_REPEATADDRESSONEACHTAB))
if (! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
$outputlangs->load("exports");
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.');
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
{
// Create a format for the column headings
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
$alias=str_replace(array('.','-'),'_',$code);
if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.');
{
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
{
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
$outputlangs->load("exports");
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
// Create a format for the column headings
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
$alias=str_replace(array('.','-'),'_',$code);
if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.');
{
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
{
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
{
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
{
if (! empty($conf->global->MAIN_USE_PHP_WRITEEXCEL))
$ecmdir = new EcmDirectory($db);
if (! empty($section))
$sectionauto=array();
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>$conf->product->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); }
if (! empty($conf->societe->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
if (! empty($conf->propal->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Prop"), 'desc'=>$langs->trans("ECMDocsByProposals")); }
if (! empty($conf->contrat->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsByContracts")); }
if (! empty($conf->commande->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order', 'test'=>$conf->commande->enabled,'label'=>$langs->trans("CustomersOrders"), 'desc'=>$langs->trans("ECMDocsByOrders")); }
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'order_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersInvoices"), 'desc'=>$langs->trans("ECMDocsByOrders")); }
if (! empty($conf->facture->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice', 'test'=>$conf->facture->enabled, 'label'=>$langs->trans("CustomersInvoices"), 'desc'=>$langs->trans("ECMDocsByInvoices")); }
if (! empty($conf->fournisseur->enabled)) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'invoice_supplier', 'test'=>$conf->fournisseur->enabled, 'label'=>$langs->trans("SuppliersOrders"), 'desc'=>$langs->trans("ECMDocsByOrders")); }
$param='&section='.$section;
$textifempty=($section?$langs->trans("NoFileFound"):$langs->trans("ECMSelectASection"));
$formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty);
{
if (empty($conf->workflow->enabled)) return 0; // Module not active, we do nothing
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (! empty($conf->commande->enabled) && ! empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER))
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (! empty($conf->facture->enabled) && ! empty($conf->global->WORKFLOW_ORDER_AUTOCREATE_INVOICE))
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
if (! empty($conf->propal->enabled) && ! empty($conf->global->WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL))
$object->fetchObjectLinked('','propal',$object->id,$object->element);
if (! empty($object->linkedObjects))
if (! empty($conf->commande->enabled) && ! empty($conf->global->WORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER))
$object->fetchObjectLinked('','commande',$object->id,$object->element);
if (! empty($object->linkedObjects))
<tr <?php echo 'id="row-'.$line->id.'" '.$bcdd[$var]; ?>>
<?php if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { ?>
// Add date of deposit
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')';
{
if (!empty($line->fk_product)) {
// Add description in form
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
{
print (! empty($line->description) && $line->description!=$line->product_label)?'<br>'.dol_htmlentitiesbr($line->description):'';
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
if (! empty($line->label)) {
<?php if (!empty($line->remise_percent) && $line->special_code != 3) { ?>
<input type="hidden" id="product_type" name="type" value="<?php echo $line->product_type; ?>">
<input type="hidden" id="product_id" name="productid" value="<?php echo (! empty($line->fk_product)?$line->fk_product:0); ?>" />
<tr <?php echo $bc[$var]; ?>>
<td<?php echo (! empty($conf->global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>
<input id="product_label" name="product_label" size="40" value="<?php echo $label; ?>"<?php echo $placeholder . ((! empty($line->fk_product) && empty($line->label)) ? ' disabled="disabled"' : ''); ?>>
<?php if (! empty($conf->margin->enabled)) { ?>
<?php if (! empty($conf->service->enabled) && $line->product_type == 1 && $dateSelector) { ?>
// Check if decription is not empty for free line
<?php if (! empty($conf->fckeditor->enabled) && ! empty($conf->global->FCKEDITOR_ENABLE_DETAILS)) { ?>
CKEDITOR.on('instanceReady', function() {
<?php if (! empty($conf->margin->enabled)) { ?>
$logo='';
if (! empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
}
elseif (! empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
$backgroundimage='';
if(! empty($conf->global->ADHERENT_CARD_BACKGROUND) && file_exists($conf->adherent->dir_output.'/'.$conf->global->ADHERENT_CARD_BACKGROUND))
$this->Tformat = $_Avery_Labels[$this->code];
if (empty($this->Tformat)) { dol_print_error('','ErrorBadTypeForCard'.$this->code); exit; }
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
$pdf->SetKeyWords($outputlangs->transnoentities('MembersCards')." ".$outputlangs->transnoentities("Foundation")." ".$outputlangs->convToOutputCharset($mysoc->name));
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
if (! empty($conf->global->MAIN_UMASK))
$attachment=true;
if (! empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) $attachment=false;
if (!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE)) {
if (!empty($conf->clicktodial->enabled)) {
if (!empty($user->societe_id)) {
$canreadperms = true;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS)) {
if (!empty($conf->ldap->enabled) && !empty($conf->global->LDAP_SYNCHRO_ACTIVE)) {
$forcethemedir = (!empty($conf->global->MAIN_FORCETHEMEDIR) ? $conf->global->MAIN_FORCETHEMEDIR : '');
$dirthemes = array($forcethemedir . '/theme');
if (!empty($conf->modules_parts['themes'])) {
$selected_theme = $conf->global->MAIN_THEME;
if (!empty($fuser->conf->MAIN_THEME))
if (! empty($conf->global->LDAP_SYNCHRO_ACTIVE))
if (! empty($conf->global->LDAP_SYNCHRO_ACTIVE))
if (! empty($conf->societe->enabled) && ! empty($conf->global->LDAP_CONTACT_ACTIVE))
if (! empty($conf->adherent->enabled) && ! empty($conf->global->LDAP_MEMBER_ACTIVE))
}
else if (empty($conf->global->LDAP_SERVER_HOST))
}
else if (empty($key) || empty($dn) || empty($objectclass))
//if (! empty($conf->db->character_set)) $this->forcecharset=$conf->db->character_set;
//if (! empty($conf->db->dolibarr_main_db_collation)) $this->forcecollate=$conf->db->dolibarr_main_db_collation;
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
$cryptType = (!empty($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
//Encryption key
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
if ($cryptType && !empty($cryptKey))
// Type of encryption (2: AES (recommended), 1: DES , 0: no encryption)
$cryptType = (!empty($conf->db->dolibarr_main_db_encryption)?$conf->db->dolibarr_main_db_encryption:0);
//Encryption key
$cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey)?$conf->db->dolibarr_main_db_cryptkey:'');
if ($cryptType && !empty($cryptKey))
// Check parameters
if (empty($this->menu_handler)) return -1;
// Max rowid can be empty if there is no record yet
if(empty($maxrowid)) $maxrowid=1;
* @param string $menu_handler Filter on name of menu_handler used (auguria, eldy...)
* @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty)
// Define menutopid of mainmenu
if (empty($menutopid) && $val['type'] == 'top' && $val['mainmenu'] == $mainmenu)
if (empty($val['fk_leftmenu']))
$enabled = verifCond($menu['enabled']);
if ($conf->use_javascript_ajax && ! empty($conf->global->MAIN_MENU_USE_JQUERY_ACCORDION) && preg_match('/^\$leftmenu/',$menu['enabled'])) $enabled=1;
{
if (! empty($menu['langs'])) // If there is a dedicated translation file
$sql.= " WHERE s.entity IN (".getEntity('societe', 1).")";
if ($selected && $conf->use_javascript_ajax && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT)) $sql.= " AND rowid = ".$selected;
{
if ($conf->use_javascript_ajax && ! empty($conf->global->COMPANY_USE_SEARCH_TO_SELECT))
* @param string $order Sort criteria
* @param int $showempty 1=Add en empty line
*/
function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $order='code', $showempty=0)
print '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($showempty) print '<option value="0"></option>';
$size='';
if (!empty($fieldsize))
$formlength=0;
if (empty($conf->global->MAIN_DISABLEPROFIDRULES)) {
if (! $selected && isset($idprof)) {
if ($idprof==1 && ! empty($this->idprof1)) $selected=$this->idprof1;
else if ($idprof==2 && ! empty($this->idprof2)) $selected=$this->idprof2;
{
if (! empty($id)) $this->object->fetch($id);
if (empty($_POST["name"]))
if (empty($this->error))
// Predefined with third party
if ((isset($objsoc->typent_code) && $objsoc->typent_code == 'TE_PRIVATE') || ! empty($conf->global->CONTACT_USE_COMPANY_ADDRESS))
if (! empty($conf->commande->enabled))
}
if (! empty($conf->propal->enabled))
}
if (! empty($conf->contrat->enabled))
}
if (! empty($conf->facture->enabled))
$year=GETPOST("year");
if (empty($year))
// Quarter
if (empty($date_start) || empty($date_end)) // We define date_start and date_end
$q=GETPOST("q");
if (empty($q))
$min = GETPOST("min");
if (empty($min)) $min = 0;
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.='<br>'.$langs->trans("DepositsAreNotIncluded");
$description.=$langs->trans("RulesVATInProducts");
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.=' '.$langs->trans("DepositsAreNotIncluded");
$intra = str_replace($find,$replace,$coll->tva_intra);
if(empty($intra))
$intra = str_replace($find,$replace,$coll->tva_intra);
if(empty($intra))
//require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
if (!empty($conf->adherent->enabled))
require_once DOL_DOCUMENT_ROOT . '/adherent/class/adherent.class.php';
if (!empty($conf->propal->enabled))
if (!empty($_GET["backtopage"])) {
// Multiprice level
if (!empty($conf->global->PRODUIT_MULTIPRICES)) {
*/
if (!empty($conf->propal->enabled) && $user->rights->propale->lire) {
if (!empty($conf->propal->enabled) && $user->rights->propale->creer) {
// Add action
if (!empty($conf->agenda->enabled) && !empty($conf->global->MAIN_REPEATTASKONEACHTAB)) {
if (!empty($conf->global->MAIN_REPEATTASKONEACHTAB)) {
$ExecTimeLimit=600;
if (!empty($ExecTimeLimit))
}
if (!empty($MemoryLimit))
// Start with empty buffer
$param.=" -u ".$dolibarr_main_db_user;
if (! empty($dolibarr_main_db_port)) $param.=" -P ".$dolibarr_main_db_port;
$paramclear=$param;
if (! empty($dolibarr_main_db_pass))
if (! empty($conf->global->MAIN_UMASK))
$param.=" -U ".$dolibarr_main_db_user;
if (! empty($dolibarr_main_db_port)) $param.=" -p ".$dolibarr_main_db_port;
$paramclear=$param;
/*if (! empty($dolibarr_main_db_pass))