Fix: strict mode hurricane
This commit is contained in:
parent
be13602c71
commit
e19f8c54f1
@ -178,7 +178,7 @@ print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("AddSubscriptionIntoAccount").'</td>';
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td>';
|
||||
print $form->selectyesno('constvalue',$conf->global->ADHERENT_BANK_USE,1);
|
||||
|
||||
@ -163,7 +163,7 @@ dol_htmloutput_mesg($mesg);
|
||||
* Mailman
|
||||
*/
|
||||
$var=!$var;
|
||||
if ($conf->global->ADHERENT_USE_MAILMAN)
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
{
|
||||
//$lien=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$lien='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">';
|
||||
@ -214,7 +214,7 @@ else
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
if ($conf->global->ADHERENT_USE_MAILMAN)
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN))
|
||||
{
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="action" value="testsubscribe">';
|
||||
|
||||
@ -167,8 +167,8 @@ if (! empty($conf->paybox->enabled) || ! empty($conf->paypal->enabled))
|
||||
print $langs->trans("MEMBER_NEWFORM_PAYONLINE");
|
||||
print '</td><td width="60" align="right">';
|
||||
$listofval=array();
|
||||
if ($conf->paybox->enabled) $listofval['paybox']='Paybox';
|
||||
if ($conf->paypal->enabled) $listofval['paypal']='PayPal';
|
||||
if (! empty($conf->paybox->enabled)) $listofval['paybox']='Paybox';
|
||||
if (! empty($conf->paypal->enabled)) $listofval['paypal']='PayPal';
|
||||
print $form->selectarray("MEMBER_NEWFORM_PAYONLINE",$listofval,(! empty($conf->global->MEMBER_NEWFORM_PAYONLINE)?$conf->global->MEMBER_NEWFORM_PAYONLINE:''),1);
|
||||
print "</td></tr>\n";
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ dol_htmloutput_mesg($mesg);
|
||||
* Spip
|
||||
*/
|
||||
$var=!$var;
|
||||
if ($conf->global->ADHERENT_USE_SPIP)
|
||||
if (! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
{
|
||||
//$lien=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$lien='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">';
|
||||
|
||||
@ -79,7 +79,7 @@ if ($id)
|
||||
|
||||
llxHeader("",$langs->trans("Agenda"),'');
|
||||
|
||||
if ($conf->notification->enabled) $langs->load("mails");
|
||||
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||
$head = member_prepare_head($object);
|
||||
|
||||
dol_fiche_head($head, 'agenda', $langs->trans("Member"),0,'user');
|
||||
@ -142,7 +142,7 @@ if ($id)
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/action/fiche.php?action=create&socid='.$socid.'">'.$langs->trans("AddAction").'</a>';
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ if ($rowid)
|
||||
|
||||
$rowspan=9;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1;
|
||||
if ($conf->societe->enabled) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -545,7 +545,7 @@ if ($rowid)
|
||||
print '</td></tr>';
|
||||
|
||||
// Third party Dolibarr
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
@ -675,7 +675,7 @@ if ($rowid)
|
||||
print '<td align="center">'.$langs->trans("DateSubscription").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateEnd").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td align="right">'.$langs->trans("Account").'</td>';
|
||||
}
|
||||
@ -693,7 +693,7 @@ if ($rowid)
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->dateadh),'day')."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datef),'day')."</td>\n";
|
||||
print '<td align="right">'.price($objp->cotisation).'</td>';
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->bid)
|
||||
@ -720,7 +720,7 @@ if ($rowid)
|
||||
|
||||
|
||||
// Link for paypal payment
|
||||
if ($conf->paypal->enabled)
|
||||
if (! empty($conf->paypal->enabled))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
|
||||
print showPaypalPaymentUrl('membersubscription',$object->ref);
|
||||
@ -889,7 +889,7 @@ if ($rowid)
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input type="radio" class="moreaction" id="none" name="paymentsave" value="none"'.(!$bankdirect&&!$bankviainvoice?' checked="checked"':'').'> '.$langs->trans("None").'<br>';
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="bankdirect" name="paymentsave" value="bankdirect"'.($bankdirect?' checked="checked"':'');
|
||||
print '> '.$langs->trans("MoreActionBankDirect").'<br>';
|
||||
|
||||
@ -160,7 +160,7 @@ class Adherent extends CommonObject
|
||||
|
||||
// Envoi mail confirmation
|
||||
$from=$conf->email_from;
|
||||
if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||
if (! empty($conf->global->ADHERENT_MAIL_FROM)) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile($subjecttosend, $this->email, $from, $texttosend, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml);
|
||||
|
||||
@ -99,7 +99,7 @@ if ($result)
|
||||
print_liste_field_titre($langs->trans("Name"),"cotisations.php","d.nom",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Login"),"cotisations.php","d.login",$param,"","",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Label"),"cotisations.php","c.note",$param,"",'align="left"',$sortfield,$sortorder);
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print_liste_field_titre($langs->trans("Account"),"cotisations.php","b.fk_account",$pram,"","",$sortfield,$sortorder);
|
||||
}
|
||||
@ -153,7 +153,7 @@ if ($result)
|
||||
print '</td>';
|
||||
|
||||
// Banque
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($objp->fk_account)
|
||||
{
|
||||
@ -207,7 +207,7 @@ if ($result)
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
print "<td align=\"right\"> </td>\n";
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ $socid=GETPOST('socid','int');
|
||||
// Security check
|
||||
$result=restrictedArea($user,'adherent',$rowid);
|
||||
|
||||
if ($conf->mailmanspip->enabled)
|
||||
if (! empty($conf->mailmanspip->enabled))
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||
|
||||
@ -212,7 +212,7 @@ if ($action == 'confirm_sendinfo' && $confirm == 'yes')
|
||||
if ($object->email)
|
||||
{
|
||||
$from=$conf->email_from;
|
||||
if ($conf->global->ADHERENT_MAIL_FROM) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||
if (! empty($conf->global->ADHERENT_MAIL_FROM)) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||
|
||||
$result=$object->send_an_email($langs->transnoentitiesnoconv("ThisIsContentOfYourCard")."\n\n%INFOS%\n\n",$langs->transnoentitiesnoconv("CardContent"));
|
||||
|
||||
@ -844,7 +844,7 @@ if ($action == 'create')
|
||||
|
||||
/*
|
||||
// Third party Dolibarr
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td class="valeur">';
|
||||
print $form->select_company($object->fk_soc,'socid','',1);
|
||||
@ -924,7 +924,7 @@ if ($action == 'edit')
|
||||
|
||||
$rowspan=15;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
|
||||
if ($conf->societe->enabled) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
|
||||
print '<form name="formsoc" action="'.$_SERVER["PHP_SELF"].'" method="post" enctype="multipart/form-data">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
@ -1064,7 +1064,7 @@ if ($action == 'edit')
|
||||
}
|
||||
|
||||
// Third party Dolibarr
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LinkedToDolibarrThirdParty").'</td><td colspan="2" class="valeur">';
|
||||
if ($object->fk_soc)
|
||||
@ -1148,7 +1148,7 @@ if ($rowid && $action != 'edit')
|
||||
array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login)
|
||||
);
|
||||
$text=$langs->trans("ConfirmCreateLogin").'<br>';
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
if ($object->fk_soc > 0) $text.=$langs->trans("UserWillBeExternalUser");
|
||||
else $text.=$langs->trans("UserWillBeInternalUser");
|
||||
@ -1204,8 +1204,8 @@ if ($rowid && $action != 'edit')
|
||||
// Cree un tableau formulaire
|
||||
$formquestion=array();
|
||||
if ($object->email) $formquestion[]=array('type' => 'checkbox', 'name' => 'send_mail', 'label' => $label, 'value' => ($conf->global->ADHERENT_DEFAULT_SENDINFOBYMAIL?true:false));
|
||||
if ($conf->global->ADHERENT_USE_MAILMAN) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"),'value'=>''); }
|
||||
if ($conf->global->ADHERENT_USE_SPIP) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); }
|
||||
if (! empty($conf->global->ADHERENT_USE_MAILMAN)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroMailManEnabled"),'value'=>''); }
|
||||
if (! empty($conf->global->ADHERENT_USE_SPIP)) { $formquestion[]=array('type'=>'other','label'=>$langs->transnoentitiesnoconv("SynchroSpipEnabled"),'value'=>''); }
|
||||
print $form->formconfirm("fiche.php?rowid=".$rowid,$langs->trans("ValidateMember"),$langs->trans("ConfirmValidateMember"),"confirm_valid",$formquestion,1);
|
||||
}
|
||||
|
||||
@ -1276,7 +1276,7 @@ if ($rowid && $action != 'edit')
|
||||
|
||||
$rowspan=17;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan++;
|
||||
if ($conf->societe->enabled) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
@ -1382,7 +1382,7 @@ if ($rowid && $action != 'edit')
|
||||
}
|
||||
|
||||
// Third party Dolibarr
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
|
||||
@ -220,7 +220,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit')
|
||||
print '<input type="text" class="flat" size="60" name="note" value="'.$subscription->note.'"></td></tr>';
|
||||
|
||||
// Bank line
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
|
||||
{
|
||||
@ -335,7 +335,7 @@ if ($rowid && $action != 'edit')
|
||||
print '<tr><td>'.$langs->trans("Label").'</td><td class="valeur" colspan="3">'.$subscription->note.'</td></tr>';
|
||||
|
||||
// Bank line
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($conf->global->ADHERENT_BANK_USE || $subscription->fk_bank)
|
||||
{
|
||||
|
||||
@ -120,7 +120,7 @@ print '</tr>';
|
||||
print '<tr><td>'.$langs->trans("Login").'</td><td class="valeur">'.$adh->login.' </td></tr>';
|
||||
|
||||
// Password not crypted
|
||||
if ($conf->global->LDAP_MEMBER_FIELD_PASSWORD)
|
||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LDAPFieldPasswordNotCrypted").'</td>';
|
||||
print '<td class="valeur">'.$adh->pass.'</td>';
|
||||
@ -128,7 +128,7 @@ if ($conf->global->LDAP_MEMBER_FIELD_PASSWORD)
|
||||
}
|
||||
|
||||
// Password crypted
|
||||
if ($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED)
|
||||
if (! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD_CRYPTED))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("LDAPFieldPasswordCrypted").'</td>';
|
||||
print '<td class="valeur">'.$adh->pass_crypted.'</td>';
|
||||
|
||||
@ -198,7 +198,7 @@ if ($resql)
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
if ($conf->categorie->enabled)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(3,$search_categ,'search_categ',1);
|
||||
|
||||
@ -290,7 +290,7 @@ if (! isset($_SERVER['WINDIR']))
|
||||
}
|
||||
|
||||
// Module produits
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
@ -308,7 +308,7 @@ if ($conf->societe->enabled)
|
||||
}
|
||||
|
||||
// Module produits
|
||||
if ($conf->product->enabled)
|
||||
if (! empty($conf->product->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";
|
||||
|
||||
@ -661,7 +661,7 @@ else
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("State").'</td><td>';
|
||||
if ($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT) print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT);
|
||||
if (! empty($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT)) print getState($conf->global->MAIN_INFO_SOCIETE_DEPARTEMENT);
|
||||
else print ' ';
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ print "</tr>\n";
|
||||
print '<tr '.$bc[false].'><td width="200"><input type="radio" name="compta_mode" value="RECETTES-DEPENSES"'.($compta_mode != 'CREANCES-DETTES' ? ' checked' : '').'> '.$langs->trans('OptionModeTrue').'</td>';
|
||||
print '<td colspan="2">'.nl2br($langs->trans('OptionModeTrueDesc'));
|
||||
// Write info on way to count VAT
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE)
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
// print "<br>\n";
|
||||
// print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
|
||||
|
||||
@ -84,14 +84,14 @@ $head[$h][1] = $langs->trans("Setup");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
if ($conf->global->MAIN_SUBMODULE_EXPEDITION)
|
||||
if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/expedition.php";
|
||||
$head[$h][1] = $langs->trans("Sending");
|
||||
$h++;
|
||||
}
|
||||
|
||||
if ($conf->global->MAIN_SUBMODULE_LIVRAISON)
|
||||
if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/livraison.php";
|
||||
$head[$h][1] = $langs->trans("Receivings");
|
||||
|
||||
@ -206,7 +206,7 @@ $head[$h][1] = $langs->trans("Sending");
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
if ($conf->global->MAIN_SUBMODULE_LIVRAISON)
|
||||
if (! empty($conf->global->MAIN_SUBMODULE_LIVRAISON))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/livraison.php";
|
||||
$head[$h][1] = $langs->trans("Receivings");
|
||||
|
||||
@ -628,7 +628,7 @@ $var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print "<td>".$langs->trans("SuggestPaymentByRIBOnAccount")."</td>";
|
||||
print "<td>";
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
$sql = "SELECT rowid, label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||
|
||||
@ -124,7 +124,7 @@ if ($conf->global->LDAP_SYNCHRO_ACTIVE && ! $conf->global->LDAP_USER_DN)
|
||||
print '</td></tr>';
|
||||
|
||||
// Synchro contact active
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPDnContactActive").'</td><td>';
|
||||
@ -136,7 +136,7 @@ if ($conf->societe->enabled)
|
||||
}
|
||||
|
||||
// Synchro adherentt active
|
||||
if ($conf->adherent->enabled)
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPDnMemberActive").'</td><td>';
|
||||
@ -189,7 +189,7 @@ print '</td><td>'.$langs->trans("LDAPServerExample").'</td></tr>';
|
||||
// Port
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPServerPort").'</td><td>';
|
||||
if ($conf->global->LDAP_SERVER_PORT)
|
||||
if (! empty($conf->global->LDAP_SERVER_PORT))
|
||||
{
|
||||
print '<input size="25" type="text" name="port" value="'.$conf->global->LDAP_SERVER_PORT.'">';
|
||||
}
|
||||
@ -227,7 +227,7 @@ print '</td><td>'.$langs->trans("LDAPAdminDnExample").'</td></tr>';
|
||||
// Pass
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("LDAPPassword").'</td><td>';
|
||||
if ($conf->global->LDAP_ADMIN_PASS)
|
||||
if (! empty($conf->global->LDAP_ADMIN_PASS))
|
||||
{
|
||||
print '<input size="25" type="password" name="pass" value="'.$conf->global->LDAP_ADMIN_PASS.'">';// je le met en visible pour test
|
||||
}
|
||||
@ -252,7 +252,7 @@ print '</div>';
|
||||
*/
|
||||
if (function_exists("ldap_connect"))
|
||||
{
|
||||
if ($conf->global->LDAP_SERVER_HOST)
|
||||
if (! empty($conf->global->LDAP_SERVER_HOST))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=test">'.$langs->trans("LDAPTestConnect").'</a><br><br>';
|
||||
}
|
||||
|
||||
@ -373,7 +373,7 @@ print info_admin($langs->trans("LDAPDescValues"));
|
||||
/*
|
||||
* Test de la connexion
|
||||
*/
|
||||
if ($conf->global->LDAP_MEMBER_ACTIVE)
|
||||
if (! empty($conf->global->LDAP_MEMBER_ACTIVE))
|
||||
{
|
||||
$butlabel=$langs->trans("LDAPTestSynchroMember");
|
||||
$testlabel='testmember';
|
||||
|
||||
@ -189,7 +189,7 @@ $head[$h][0] = DOL_URL_ROOT."/admin/confexped.php";
|
||||
$head[$h][1] = $langs->trans("Setup");
|
||||
$h++;
|
||||
|
||||
if ($conf->global->MAIN_SUBMODULE_EXPEDITION)
|
||||
if (! empty($conf->global->MAIN_SUBMODULE_EXPEDITION))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/expedition.php";
|
||||
$head[$h][1] = $langs->trans("Sending");
|
||||
|
||||
@ -627,7 +627,7 @@ else
|
||||
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=test&mode=init">'.$langs->trans("DoTestSend").'</a>';
|
||||
|
||||
if ($conf->fckeditor->enabled)
|
||||
if (! empty($conf->fckeditor->enabled))
|
||||
{
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testhtml&mode=init">'.$langs->trans("DoTestSendHTML").'</a>';
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ print '<br>';
|
||||
* Notifications
|
||||
*/
|
||||
|
||||
if ($conf->global->MAIN_MODULE_NOTIFICATION)
|
||||
if (! empty($conf->global->MAIN_MODULE_NOTIFICATION))
|
||||
{
|
||||
$langs->load("mails");
|
||||
print_titre($langs->trans("Notifications"));
|
||||
|
||||
@ -301,7 +301,7 @@ $var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="3">'.$langs->trans("DoNotStoreClearPassword").'</td>';
|
||||
print '<td align="center" width="60">';
|
||||
if ($conf->global->DATABASE_PWD_ENCRYPTED)
|
||||
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
||||
{
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
}
|
||||
@ -312,7 +312,7 @@ if (! $conf->global->DATABASE_PWD_ENCRYPTED)
|
||||
print '<a href="security.php?action=activate_encrypt">'.$langs->trans("Activate").'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
if($conf->global->DATABASE_PWD_ENCRYPTED)
|
||||
if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))
|
||||
{
|
||||
print '<td align="center" width="100">';
|
||||
if ($allow_disable_encryption)
|
||||
|
||||
@ -133,7 +133,7 @@ print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
$var=true;
|
||||
|
||||
if ($conf->facture->enabled)
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
@ -147,7 +147,7 @@ if ($conf->facture->enabled)
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
@ -161,7 +161,7 @@ if ($conf->commande->enabled)
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
if ($conf->expedition->enabled)
|
||||
if (! empty($conf->expedition->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
@ -183,7 +183,7 @@ print " <td align=\"right\" width=\"160\"> </td>\n";
|
||||
print '</tr>'."\n";
|
||||
$var=true;
|
||||
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
@ -197,7 +197,7 @@ if ($conf->fournisseur->enabled)
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
@ -210,7 +210,7 @@ if ($conf->fournisseur->enabled)
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print "</form>\n</td>\n</tr>\n";
|
||||
}
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
@ -36,7 +36,7 @@ $choice=GETPOST('choice');
|
||||
|
||||
// Define filelog to discard it from purge
|
||||
$filelog='';
|
||||
if ($conf->syslog->enabled)
|
||||
if (! empty($conf->syslog->enabled))
|
||||
{
|
||||
$filelog=SYSLOG_FILE;
|
||||
$filelog=preg_replace('/DOL_DATA_ROOT/i',DOL_DATA_ROOT,$filelog);
|
||||
@ -131,7 +131,7 @@ print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr class="border"><td style="padding: 4px">';
|
||||
|
||||
if ($conf->syslog->enabled)
|
||||
if (! empty($conf->syslog->enabled))
|
||||
{
|
||||
print '<input type="radio" name="choice" value="logfile"';
|
||||
print ($choice && $choice=='logfile') ? ' checked="checked"' : '';
|
||||
|
||||
@ -105,7 +105,7 @@ print '<tr '.$bc[$var].'><td width=\"50%\">'.$langs->trans("CashDeskThirdPartyFo
|
||||
print '<td colspan="2">';
|
||||
print $form->select_company($conf->global->CASHDESK_ID_THIRDPARTY,'socid','s.client in (1,3)',1,1);
|
||||
print '</td></tr>';
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskBankAccountForSell").'</td>';
|
||||
@ -126,7 +126,7 @@ if ($conf->banque->enabled)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->stock->enabled)
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("CashDeskIdWareHouse").'</td>';
|
||||
@ -135,7 +135,7 @@ if ($conf->stock->enabled)
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->service->enabled)
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
$var=! $var;
|
||||
print '<tr '.$bc[$var].'><td>';
|
||||
|
||||
@ -144,7 +144,7 @@ class Facturation
|
||||
$newcartarray[$i]['price']=$product->price;
|
||||
$newcartarray[$i]['price_ttc']=$product->price_ttc;
|
||||
|
||||
if ($conf->global->PRODUIT_MULTIPRICES)
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
if (isset($product->multiprices[$societe->price_level]))
|
||||
{
|
||||
|
||||
@ -37,7 +37,7 @@ if ( $_GET['filtre'] ) {
|
||||
$sql.= " AND p.tosell = 1";
|
||||
if(!$conf->global->CASHDESK_SERVICES) $sql.= " AND p.fk_product_type = 0";
|
||||
$sql.= " AND (p.ref LIKE '%".$_GET['filtre']."%' OR p.label LIKE '%".$_GET['filtre']."%' ";
|
||||
if ($conf->barcode->enabled) $sql.= " OR p.barcode LIKE '%".$_GET['filtre']."%')";
|
||||
if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '%".$_GET['filtre']."%')";
|
||||
else $sql.= ")";
|
||||
|
||||
$sql.= " ORDER BY label";
|
||||
|
||||
@ -62,7 +62,7 @@ switch ( $_GET['action'] )
|
||||
}
|
||||
|
||||
/** add Ditto for MultiPrix*/
|
||||
if ($conf->global->PRODUIT_MULTIPRICES)
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
$thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY'];
|
||||
$productid = $ret['rowid'];
|
||||
|
||||
@ -98,7 +98,7 @@ print $form->select_company(GETPOST('socid','int')?GETPOST('socid','int'):$conf-
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
if ($conf->stock->enabled)
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$langs->load("stocks");
|
||||
print "<tr>";
|
||||
|
||||
@ -161,7 +161,7 @@ switch ($action)
|
||||
$product->fetch($tab_liste[$i]['fk_article']);
|
||||
$ret=array('label'=>$product->label,'tva_tx'=>$product->tva_tx,'price'=>$product->price);
|
||||
|
||||
if ($conf->global->PRODUIT_MULTIPRICES)
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
if (isset($product->multiprices[$societe->price_level]))
|
||||
{
|
||||
|
||||
@ -182,7 +182,7 @@ if ($socid)
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
if ($conf->notification->enabled) $langs->load("mails");
|
||||
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||
|
||||
$soc = new Societe($db);
|
||||
$result = $soc->fetch($socid);
|
||||
@ -363,7 +363,7 @@ else if ($id || $ref)
|
||||
|
||||
$rowspan=5;
|
||||
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) $rowspan+=1;
|
||||
if ($conf->societe->enabled) $rowspan++;
|
||||
if (! empty($conf->societe->enabled)) $rowspan++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
|
||||
@ -147,7 +147,7 @@ class Categorie
|
||||
|
||||
dol_syslog(get_class($this).'::create sql='.$sql);
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie (label, description,";
|
||||
if ($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
|
||||
if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
|
||||
{
|
||||
$sql.= "fk_soc,";
|
||||
}
|
||||
@ -157,7 +157,7 @@ class Categorie
|
||||
//$sql.= ", fk_parent_id";
|
||||
$sql.= ")";
|
||||
$sql.= " VALUES ('".$this->db->escape($this->label)."', '".$this->db->escape($this->description)."',";
|
||||
if ($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
|
||||
if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
|
||||
{
|
||||
$sql.= ($this->socid != -1 ? $this->socid : 'null').",";
|
||||
}
|
||||
@ -269,7 +269,7 @@ class Categorie
|
||||
{
|
||||
$sql .= ", description = '".$this->db->escape($this->description)."'";
|
||||
}
|
||||
if ($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
|
||||
if (! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
|
||||
{
|
||||
$sql .= ", fk_soc = ".($this->socid != -1 ? $this->socid : 'null');
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("commercial");
|
||||
@ -222,7 +222,7 @@ if ($objectid > 0)
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
if ($act->fk_project)
|
||||
|
||||
@ -760,7 +760,7 @@ if ($id)
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
// Projet associe
|
||||
$langs->load("project");
|
||||
@ -927,7 +927,7 @@ if ($id)
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr><td valign="top">'.$langs->trans("Project").'</td><td colspan="3">';
|
||||
if ($act->fk_project)
|
||||
|
||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||
if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
|
||||
if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3;
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ if ($action == 'create')
|
||||
print "</td></tr>";
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$projectid = 0;
|
||||
if ($origin == 'project') $projectid = ($originid?$originid:0);
|
||||
@ -294,7 +294,7 @@ if ($action == 'create')
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
if ($conf->global->PRODUCT_SHOW_WHEN_CREATE) print '<tr><td colspan="3"> </td></tr>';
|
||||
if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE)) print '<tr><td colspan="3"> </td></tr>';
|
||||
|
||||
print '<tr><td valign="top"><input type="radio" name="createmode" value="empty" checked="checked"></td>';
|
||||
print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>';
|
||||
|
||||
@ -31,20 +31,20 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
if ($conf->facture->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
if ($conf->contrat->enabled) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
if ($conf->adherent->enabled) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
if ($conf->ficheinter->enabled) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
if (! empty($conf->facture->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
if (! empty($conf->ficheinter->enabled)) require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
if ($conf->contrat->enabled) $langs->load("contracts");
|
||||
if ($conf->commande->enabled) $langs->load("orders");
|
||||
if ($conf->facture->enabled) $langs->load("bills");
|
||||
if ($conf->projet->enabled) $langs->load("projects");
|
||||
if ($conf->ficheinter->enabled) $langs->load("interventions");
|
||||
if ($conf->notification->enabled) $langs->load("mails");
|
||||
if (! empty($conf->contrat->enabled)) $langs->load("contracts");
|
||||
if (! empty($conf->commande->enabled)) $langs->load("orders");
|
||||
if (! empty($conf->facture->enabled)) $langs->load("bills");
|
||||
if (! empty($conf->projet->enabled)) $langs->load("projects");
|
||||
if (! empty($conf->ficheinter->enabled)) $langs->load("interventions");
|
||||
if (! empty($conf->notification->enabled)) $langs->load("mails");
|
||||
|
||||
// Security check
|
||||
$id = (GETPOST('socid','int') ? GETPOST('socid','int') : GETPOST('id','int'));
|
||||
@ -345,7 +345,7 @@ if ($id > 0)
|
||||
print '</tr>';
|
||||
|
||||
// Multiprice level
|
||||
if ($conf->global->PRODUIT_MULTIPRICES)
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
@ -364,7 +364,7 @@ if ($id > 0)
|
||||
include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
|
||||
|
||||
// Module Adherent
|
||||
if ($conf->adherent->enabled)
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
@ -750,13 +750,13 @@ if ($id > 0)
|
||||
// Add invoice
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
if ($conf->deplacement->enabled)
|
||||
if (! empty($conf->deplacement->enabled))
|
||||
{
|
||||
$langs->load("trips");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/deplacement/fiche.php?socid='.$object->id.'&action=create">'.$langs->trans("AddTrip").'</a>';
|
||||
}
|
||||
|
||||
if ($conf->facture->enabled)
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
if ($user->rights->facture->creer)
|
||||
{
|
||||
|
||||
@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
|
||||
if ($conf->contrat->enabled) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (! empty($conf->contrat->enabled)) require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
|
||||
if (! $user->rights->societe->lire) accessforbidden();
|
||||
|
||||
@ -80,7 +80,7 @@ $now=dol_now();
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$companystatic=new Societe($db);
|
||||
if ($conf->propal->enabled) $propalstatic=new Propal($db);
|
||||
if (! empty($conf->propal->enabled)) $propalstatic=new Propal($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
|
||||
@ -145,7 +145,7 @@ if ($result)
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
if ($conf->categorie->enabled)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1);
|
||||
|
||||
@ -1231,7 +1231,7 @@ else if ($action == 'validate')
|
||||
}
|
||||
|
||||
$text=$langs->trans('ConfirmValidateProp',$numref);
|
||||
if ($conf->notification->enabled)
|
||||
if (! empty($conf->notification->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
|
||||
@ -29,7 +29,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load('propal');
|
||||
$langs->load("bills");
|
||||
|
||||
@ -151,7 +151,7 @@ else
|
||||
/*
|
||||
* Draft proposals
|
||||
*/
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||
@ -369,7 +369,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
* Proposals to process
|
||||
*/
|
||||
/*
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, s.nom, s.rowid as socid";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."propal as c";
|
||||
@ -441,7 +441,7 @@ if ($conf->propal->enabled)
|
||||
/*
|
||||
* Proposal that are in a shipping process
|
||||
*/
|
||||
/*if ($conf->propal->enabled)
|
||||
/*if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
|
||||
@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/comm/prospect/class/prospect.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
if ($conf->adherent->enabled) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (! empty($conf->adherent->enabled)) require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
|
||||
$langs->load('companies');
|
||||
$langs->load('projects');
|
||||
@ -152,7 +152,7 @@ if ($socid > 0)
|
||||
print '</tr>';
|
||||
|
||||
// Multiprice level
|
||||
if ($conf->global->PRODUIT_MULTIPRICES)
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
{
|
||||
print '<tr><td nowrap>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td nowrap>';
|
||||
@ -181,7 +181,7 @@ if ($socid > 0)
|
||||
include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php';
|
||||
|
||||
// Module Adherent
|
||||
if ($conf->adherent->enabled)
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
|
||||
@ -50,7 +50,7 @@ print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
|
||||
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$var=false;
|
||||
print '<table class="noborder nohover" width="100%">';
|
||||
@ -164,7 +164,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
*/
|
||||
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||
|
||||
if ($conf->agenda->enabled) show_array_actions_to_do(10);
|
||||
if (! empty($conf->agenda->enabled)) show_array_actions_to_do(10);
|
||||
|
||||
/*
|
||||
* Dernieres propales ouvertes
|
||||
|
||||
@ -261,7 +261,7 @@ if ($resql)
|
||||
|
||||
// Filter on categories
|
||||
$moreforfilter='';
|
||||
if ($conf->categorie->enabled)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||
$moreforfilter.=$formother->select_categories(2,$search_categ,'search_categ',1);
|
||||
|
||||
@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load('other');
|
||||
if ($conf->facture->enabled) $langs->load("bills");
|
||||
if (! empty($conf->facture->enabled)) $langs->load("bills");
|
||||
|
||||
// Security check
|
||||
$socid = $_GET["socid"];
|
||||
|
||||
@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
if ($conf->facture->enabled) $langs->load("bills");
|
||||
if (! empty($conf->facture->enabled)) $langs->load("bills");
|
||||
|
||||
// Security check
|
||||
$socid = $_GET["socid"];
|
||||
|
||||
@ -29,8 +29,8 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
if ($conf->propal->enabled) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load('orders');
|
||||
$langs->load('propal');
|
||||
|
||||
@ -178,7 +178,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td colspan="3">'.$object->client->getNomUrl(1).'</td></tr>';
|
||||
|
||||
// Delivery address
|
||||
if ($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)
|
||||
if (! empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
|
||||
@ -1462,7 +1462,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
|
||||
// Date de livraison
|
||||
print "<tr><td>".$langs->trans("DeliveryDate").'</td><td colspan="2">';
|
||||
if ($conf->global->DATE_LIVRAISON_WEEK_DELAY)
|
||||
if (! empty($conf->global->DATE_LIVRAISON_WEEK_DELAY))
|
||||
{
|
||||
$datedelivery = time() + ((7*$conf->global->DATE_LIVRAISON_WEEK_DELAY) * 24 * 60 * 60);
|
||||
}
|
||||
@ -1699,7 +1699,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
}
|
||||
|
||||
$text=$langs->trans('ConfirmValidateOrder',$numref);
|
||||
if ($conf->notification->enabled)
|
||||
if (! empty($conf->notification->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
@ -1808,7 +1808,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
* Commande
|
||||
*/
|
||||
$nbrow=9;
|
||||
if ($conf->projet->enabled) $nbrow++;
|
||||
if (! empty($conf->projet->enabled)) $nbrow++;
|
||||
|
||||
//Local taxes
|
||||
if ($mysoc->country_code=='ES')
|
||||
@ -2201,7 +2201,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
|
||||
// Ship
|
||||
$numshipping=0;
|
||||
if ($conf->expedition->enabled)
|
||||
if (! empty($conf->expedition->enabled))
|
||||
{
|
||||
$numshipping = $object->nb_expedition();
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ else
|
||||
/*
|
||||
* Draft orders
|
||||
*/
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
@ -282,7 +282,7 @@ else dol_print_error($db);
|
||||
/*
|
||||
* Orders to process
|
||||
*/
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
|
||||
$sql.=" FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
@ -353,7 +353,7 @@ if ($conf->commande->enabled)
|
||||
/*
|
||||
* Orders thar are in a shipping process
|
||||
*/
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$sql = "SELECT c.rowid, c.ref, c.fk_statut, c.facture, s.nom, s.rowid as socid";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."commande as c";
|
||||
|
||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
||||
if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
|
||||
$langs->load('orders');
|
||||
$langs->load('deliveries');
|
||||
@ -416,7 +416,7 @@ if ($action == 'create')
|
||||
$html->select_types_paiements(isset($_POST['mode_reglement_id'])?$_POST['mode_reglement_id']:$mode_reglement_id,'mode_reglement_id');
|
||||
print '</td></tr>';
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
|
||||
|
||||
@ -281,7 +281,7 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy code
|
||||
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
|
||||
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
|
||||
{
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="account_number" value="'.$account->account_number.'"></td></tr>';
|
||||
@ -563,7 +563,7 @@ else
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy code
|
||||
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED)
|
||||
if (! empty($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED))
|
||||
{
|
||||
print '<tr><td valign="top" class="fieldrequired">'.$langs->trans("AccountancyCode").'</td>';
|
||||
print '<td colspan="3"><input type="text" name="account_number" value="'.(isset($_POST["account_number"])?$_POST["account_number"]:$account->account_number).'"></td></tr>';
|
||||
|
||||
@ -32,7 +32,7 @@ $langs->load("banks");
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("categories");
|
||||
if ($conf->adherent->enabled) $langs->load("members");
|
||||
if (! empty($conf->adherent->enabled)) $langs->load("members");
|
||||
|
||||
|
||||
$id = (GETPOST('id','int') ? GETPOST('id','int') : GETPOST('account','int'));
|
||||
|
||||
@ -27,7 +27,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/trip.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
@ -489,7 +489,7 @@ else if ($id)
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load('projects');
|
||||
print '<tr>';
|
||||
|
||||
@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/dons/class/don.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("donations");
|
||||
@ -280,7 +280,7 @@ if ($action == 'create')
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
|
||||
$nbrows=11;
|
||||
if ($conf->projet->enabled) $nbrows++;
|
||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||
|
||||
// Date
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
@ -318,7 +318,7 @@ if ($action == 'create')
|
||||
$form->select_types_paiements('', 'modepaiement', 'CRDT', 0, 1);
|
||||
print "</td></tr>\n";
|
||||
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
// Si module projet actif
|
||||
print "<tr><td>".$langs->trans("Project")."</td><td>";
|
||||
@ -368,7 +368,7 @@ if (! empty($id) && $action == 'edit')
|
||||
print '</tr>';
|
||||
|
||||
$nbrows=12;
|
||||
if ($conf->projet->enabled) $nbrows++;
|
||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||
|
||||
// Date
|
||||
print "<tr>".'<td width="25%" class="fieldrequired">'.$langs->trans("Date").'</td><td>';
|
||||
@ -458,7 +458,7 @@ if (! empty($id) && $action != 'edit')
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/dons/liste.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
$nbrows=12;
|
||||
if ($conf->projet->enabled) $nbrows++;
|
||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||
|
||||
// Ref
|
||||
print "<tr>".'<td>'.$langs->trans("Ref").'</td><td colspan="2">';
|
||||
@ -502,7 +502,7 @@ if (! empty($id) && $action != 'edit')
|
||||
print "<tr>".'<td>'.$langs->trans("Status").'</td><td>'.$don->getLibStatut(4).'</td></tr>';
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print "<tr>".'<td>'.$langs->trans("Project").'</td><td>'.$don->projet.'</td></tr>';
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ if (!$user->rights->don->lire) accessforbidden();
|
||||
* View
|
||||
*/
|
||||
|
||||
if ($conf->projet->enabled) $projectstatic=new Project($db);
|
||||
if (! empty($conf->projet->enabled)) $projectstatic=new Project($db);
|
||||
|
||||
llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones');
|
||||
|
||||
@ -160,7 +160,7 @@ if ($resql)
|
||||
print "<td>".$objp->societe."</td>\n";
|
||||
print "<td>".$donationstatic->getFullName($langs)."</td>\n";
|
||||
print '<td align="center">'.dol_print_date($db->jdate($objp->datedon),'day').'</td>';
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print "<td>";
|
||||
if ($objp->pid)
|
||||
|
||||
@ -1882,7 +1882,7 @@ if ($action == 'create')
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Proforma
|
||||
if ($conf->global->FACTURE_USE_PROFORMAT)
|
||||
if (! empty($conf->global->FACTURE_USE_PROFORMAT))
|
||||
{
|
||||
print '<tr height="18"><td width="16px" valign="middle">';
|
||||
print '<input type="radio" name="type" value="4"'.(GETPOST('type')==4?' checked="checked"':'').'>';
|
||||
@ -1973,7 +1973,7 @@ if ($action == 'create')
|
||||
print '</td></tr>';
|
||||
|
||||
// Project
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load('projects');
|
||||
print '<tr><td>'.$langs->trans('Project').'</td><td colspan="2">';
|
||||
@ -2080,7 +2080,7 @@ if ($action == 'create')
|
||||
print '<td>'.$langs->trans('Qty').'</td>';
|
||||
print '<td>'.$langs->trans('ReductionShort').'</td>';
|
||||
print '<td> </td>';
|
||||
if ($conf->service->enabled)
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans('ServiceLimitedDuration').'</td>';
|
||||
}
|
||||
@ -2090,7 +2090,7 @@ if ($action == 'create')
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
$form->select_produits('','idprod'.$i,'',$conf->product->limit_size,$soc->price_level);
|
||||
else
|
||||
$form->select_produits('','idprod'.$i,'',$conf->product->limit_size);
|
||||
@ -2099,7 +2099,7 @@ if ($action == 'create')
|
||||
print '<td nowrap="nowrap"><input type="text" size="1" name="remise_percent'.$i.'" value="'.$soc->remise_client.'">%</td>';
|
||||
print '<td> </td>';
|
||||
// Si le module service est actif, on propose des dates de debut et fin a la ligne
|
||||
if ($conf->service->enabled)
|
||||
if (! empty($conf->service->enabled))
|
||||
{
|
||||
print '<td nowrap="nowrap">';
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
@ -2243,7 +2243,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
|
||||
$text=$langs->trans('ConfirmValidateBill',$numref);
|
||||
if ($conf->notification->enabled)
|
||||
if (! empty($conf->notification->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/class/notify.class.php';
|
||||
$notify=new Notify($db);
|
||||
@ -2624,8 +2624,8 @@ else if ($id > 0 || ! empty($ref))
|
||||
*/
|
||||
|
||||
$nbrows=8; $nbcols=2;
|
||||
if ($conf->projet->enabled) $nbrows++;
|
||||
if ($conf->banque->enabled) $nbcols++;
|
||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||
if (! empty($conf->banque->enabled)) $nbcols++;
|
||||
|
||||
//Local taxes
|
||||
if ($mysoc->pays_code=='ES')
|
||||
@ -2642,7 +2642,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.($object->type == 2 ? $langs->trans("PaymentsBack") : $langs->trans('Payments')).'</td>';
|
||||
print '<td>'.$langs->trans('Type').'</td>';
|
||||
if ($conf->banque->enabled) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
|
||||
if (! empty($conf->banque->enabled)) print '<td align="right">'.$langs->trans('BankAccount').'</td>';
|
||||
print '<td align="right">'.$langs->trans('Amount').'</td>';
|
||||
print '<td width="18"> </td>';
|
||||
print '</tr>';
|
||||
@ -2679,7 +2679,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
print dol_print_date($db->jdate($objp->dp),'day').'</a></td>';
|
||||
$label=($langs->trans("PaymentType".$objp->payment_code)!=("PaymentType".$objp->payment_code))?$langs->trans("PaymentType".$objp->payment_code):$objp->payment_label;
|
||||
print '<td>'.$label.' '.$objp->num_paiement.'</td>';
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
$bankaccountstatic->id=$objp->baid;
|
||||
$bankaccountstatic->ref=$objp->ref;
|
||||
|
||||
@ -30,7 +30,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
if ($conf->projet->enabled) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
@ -288,7 +288,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '</td>';
|
||||
|
||||
$nbrows=5;
|
||||
if ($conf->projet->enabled) $nbrows++;
|
||||
if (! empty($conf->projet->enabled)) $nbrows++;
|
||||
print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">';
|
||||
|
||||
/*
|
||||
@ -366,7 +366,7 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<tr><td>'.$langs->trans('Status').'</td><td align="left" colspan="3">'.($object->getLibStatut(4,$totalpaye)).'</td></tr>';
|
||||
|
||||
// Projet
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
print '<tr>';
|
||||
|
||||
@ -88,7 +88,7 @@ if ($action == "builddoc" && $user->rights->facture->lire)
|
||||
}
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) $pdf->SetCompression(false);
|
||||
if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
|
||||
|
||||
// Add all others
|
||||
foreach($files as $file)
|
||||
|
||||
@ -27,9 +27,9 @@ require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
if ($conf->commande->enabled) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
if ($conf->tax->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
if (! empty($conf->commande->enabled)) require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
if (! empty($conf->tax->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||
|
||||
// L'espace compta/treso doit toujours etre actif car c'est un espace partage
|
||||
// par de nombreux modules (banque, facture, commande a facturer, etc...) independamment
|
||||
@ -40,7 +40,7 @@ if ($conf->tax->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/
|
||||
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
if ($conf->commande->enabled) $langs->load("orders");
|
||||
if (! empty($conf->commande->enabled)) $langs->load("orders");
|
||||
|
||||
// Security check
|
||||
$socid='';
|
||||
@ -349,7 +349,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastCustomerBills",$max).'</td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
@ -388,7 +388,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
$thirdpartystatic->client=1;
|
||||
print $thirdpartystatic->getNomUrl(1,'customer',44);
|
||||
print '</td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
|
||||
print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'</td>';
|
||||
@ -404,7 +404,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
else
|
||||
{
|
||||
$colspan=5;
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
@ -446,7 +446,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BoxTitleLastSupplierBills",$max).'</td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DateModificationShort").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
@ -469,7 +469,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
$thirdpartystatic->fournisseur=1;
|
||||
print $thirdpartystatic->getNomUrl(1,'supplier',44);
|
||||
print '</td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td align="right">'.dol_print_date($db->jdate($obj->tms),'day').'</td>';
|
||||
print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3).'</td>';
|
||||
@ -484,7 +484,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
else
|
||||
{
|
||||
$colspan=5;
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
@ -742,7 +742,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
||||
print '<table class="noborder" width="100%">';
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<td colspan="2">'.$langs->trans("OrdersToBill").' <a href="'.DOL_URL_ROOT.'/commande/liste.php?status=3&afacturer=1">('.$num.')</a></td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("ToBill").'</td>';
|
||||
print '<td align="center" width="16"> </td>';
|
||||
@ -781,7 +781,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
||||
$societestatic->client=1;
|
||||
print $societestatic->getNomUrl(1,'customer',44);
|
||||
print '</a></td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc-$obj->tot_fttc).'</td>';
|
||||
print '<td>'.$commandestatic->LibStatut($obj->fk_statut,$obj->facture,3).'</td>';
|
||||
@ -795,7 +795,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToBill").': '.price($tot_tobill).')</font> </td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($tot_ht).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($tot_ht).'</td>';
|
||||
print '<td align="right">'.price($tot_ttc).'</td>';
|
||||
print '<td align="right">'.price($tot_tobill).'</td>';
|
||||
print '<td> </td>';
|
||||
@ -840,7 +840,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsCustomersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/compta/facture/impayees.php">('.$num.')</a></td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Received").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
@ -880,7 +880,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
$societestatic->client=1;
|
||||
print $societestatic->getNomUrl(1,'customer',44);
|
||||
print '</a></td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td align="right">'.price($obj->am).'</td>';
|
||||
print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3,$obj->am).'</td>';
|
||||
@ -894,7 +894,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToTake").': '.price($total_ttc-$totalam).')</font> </td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($total).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
|
||||
print '<td align="right">'.price($total_ttc).'</td>';
|
||||
print '<td align="right">'.price($totalam).'</td>';
|
||||
print '<td> </td>';
|
||||
@ -903,7 +903,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
else
|
||||
{
|
||||
$colspan=5;
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
@ -944,7 +944,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("BillsSuppliersUnpaid",$num).' <a href="'.DOL_URL_ROOT.'/fourn/facture/impayees.php">('.$num.')</a></td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.$langs->trans("AmountHT").'</td>';
|
||||
print '<td align="right">'.$langs->trans("AmountTTC").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Paid").'</td>';
|
||||
print '<td width="16"> </td>';
|
||||
@ -967,7 +967,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
$societestatic->nom=$obj->nom;
|
||||
$societestatic->client=0;
|
||||
print '<td>'.$societestatic->getNomUrl(1, 'supplier', 44).'</td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($obj->total_ht).'</td>';
|
||||
print '<td align="right">'.price($obj->total_ttc).'</td>';
|
||||
print '<td align="right">'.price($obj->am).'</td>';
|
||||
print '<td>'.$facstatic->LibStatut($obj->paye,$obj->fk_statut,3).'</td>';
|
||||
@ -980,7 +980,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
}
|
||||
|
||||
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").' <font style="font-weight: normal">('.$langs->trans("RemainderToPay").': '.price($total_ttc-$totalam).')</font> </td>';
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) print '<td align="right">'.price($total).'</td>';
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print '<td align="right">'.price($total).'</td>';
|
||||
print '<td align="right">'.price($total_ttc).'</td>';
|
||||
print '<td align="right">'.price($totalam).'</td>';
|
||||
print '<td> </td>';
|
||||
@ -989,7 +989,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
else
|
||||
{
|
||||
$colspan=5;
|
||||
if ($conf->global->MAIN_SHOW_HT_ON_SUMMARY) $colspan++;
|
||||
if (! empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++;
|
||||
print '<tr '.$bc[$var].'><td colspan="'.$colspan.'">'.$langs->trans("NoInvoice").'</td></tr>';
|
||||
}
|
||||
print '</table><br>';
|
||||
|
||||
@ -496,7 +496,7 @@ class Localtax extends CommonObject
|
||||
if ($this->id > 0)
|
||||
{
|
||||
$ok=1;
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
// Insertion dans llx_bank
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
@ -107,7 +107,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
||||
$nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$description=$langs->trans("RulesVATDue");
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$builddate=time();
|
||||
@ -124,7 +124,7 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
$nom=$langs->transcountry("LT2ReportByCustomersInInputOutputMode",$mysoc->country_code);
|
||||
$period=$form->select_date($date_start,'date_start',0,0,0,'',1,0,1).' - '.$form->select_date($date_end,'date_end',0,0,0,'',1,0,1);
|
||||
$description=$langs->trans("RulesVATIn");
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$builddate=time();
|
||||
|
||||
@ -168,7 +168,7 @@ if ($_GET["action"] == 'create')
|
||||
// Amount
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
|
||||
$form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
|
||||
@ -227,7 +227,7 @@ if ($id)
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</td></tr>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($vatpayment->fk_account > 0)
|
||||
{
|
||||
|
||||
@ -97,7 +97,7 @@ if ($action == 'add_paiement' || ($action == 'confirm_paiement' && $confirm=='ye
|
||||
$error++;
|
||||
}
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
// Si module bank actif, un compte est obligatoire lors de la saisie
|
||||
// d'un paiement
|
||||
@ -385,7 +385,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
// Bank account
|
||||
print '<tr>';
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($facture->type != 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToCredit').'</span></td>';
|
||||
if ($facture->type == 2) print '<td><span class="fieldrequired">'.$langs->trans('AccountToDebit').'</span></td>';
|
||||
@ -589,10 +589,10 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
{
|
||||
// print '<tr><td colspan="3" align="center">';
|
||||
print '<center><br><input type="checkbox" checked="checked" name="closepaidinvoices"> '.$langs->trans("ClosePaidInvoicesAutomatically");
|
||||
/*if ($conf->prelevement->enabled)
|
||||
/*if (! empty($conf->prelevement->enabled))
|
||||
{
|
||||
$langs->load("withdrawals");
|
||||
if ($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS) print '<br>'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed");
|
||||
if (! empty($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS)) print '<br>'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed");
|
||||
}*/
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans('Save').'"><br><br></center>';
|
||||
// print '</td></tr>';
|
||||
|
||||
@ -192,7 +192,7 @@ class Paiement extends CommonObject
|
||||
// This payment might be this one or a previous one
|
||||
if ($paym['type']=='PRE')
|
||||
{
|
||||
if ($conf->prelevement->enabled)
|
||||
if (! empty($conf->prelevement->enabled))
|
||||
{
|
||||
// TODO Check if this payment has a withdraw request
|
||||
// if not, $mustwait++; // This will disable automatic close on invoice to allow to process
|
||||
@ -377,7 +377,7 @@ class Paiement extends CommonObject
|
||||
$bank_line_id=0;
|
||||
$this->fk_account=$accountid;
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/facture/modules_facture.php';
|
||||
if ($conf->banque->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('banks');
|
||||
@ -238,7 +238,7 @@ print $form->editfieldval("Note",'note',$object->note,$object,$user->rights->fac
|
||||
print '</td></tr>';
|
||||
|
||||
// Bank account
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($object->bank_account)
|
||||
{
|
||||
@ -355,7 +355,7 @@ print '</div>';
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||
{
|
||||
if ($user->societe_id == 0 && $object->statut == 0 && $_GET['action'] == '')
|
||||
{
|
||||
|
||||
@ -143,7 +143,7 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("Account"),$_SERVER["PHP_SELF"],"ba.label","",$paramlist,"",$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"p.amount","",$paramlist,'align="right"',$sortfield,$sortorder);
|
||||
//print_liste_field_titre($langs->trans("Invoices"),"","","",$paramlist,'align="left"',$sortfield,$sortorder);
|
||||
if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||
{
|
||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"p.statut","",$paramlist,'align="right"',$sortfield,$sortorder);
|
||||
}
|
||||
@ -168,7 +168,7 @@ if ($resql)
|
||||
print '<input class="fat" type="text" size="4" name="search_amount" value="'.$_REQUEST["search_amount"].'">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '</td>';
|
||||
@ -213,7 +213,7 @@ if ($resql)
|
||||
print '</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
|
||||
if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||
{
|
||||
print '<td align="right">';
|
||||
if ($objp->statut == 0) print '<a href="fiche.php?id='.$objp->rowid.'&action=valide">';
|
||||
|
||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php';
|
||||
if ($conf->banque->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
if (! empty($conf->banque->enabled)) require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
$langs->load('bills');
|
||||
$langs->load('banks');
|
||||
@ -189,7 +189,7 @@ print '<tr><td valign="top">'.$langs->trans('Amount').'</td><td colspan="3">'.pr
|
||||
print '<tr><td valign="top">'.$langs->trans('Note').'</td><td colspan="3">'.nl2br($paiement->note).'</td></tr>';
|
||||
|
||||
// Bank account
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($paiement->bank_account)
|
||||
{
|
||||
@ -293,7 +293,7 @@ print '</div>';
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
/*
|
||||
if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
|
||||
if (! empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))
|
||||
{
|
||||
if ($user->societe_id == 0 && $paiement->statut == 0 && $_GET['action'] == '')
|
||||
{
|
||||
|
||||
@ -1185,7 +1185,7 @@ class BonPrelevement extends CommonObject
|
||||
if ($mysoc->country_code=='ES')
|
||||
{
|
||||
// TODO replace by a hook (external modules)
|
||||
if ($conf->esaeb->enabled)
|
||||
if (! empty($conf->esaeb->enabled))
|
||||
{
|
||||
//Head
|
||||
$esaeb19 = new AEB19DocWritter;
|
||||
|
||||
@ -27,7 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
if ($conf->facture->enabled) $langs->load("bills");
|
||||
if (! empty($conf->facture->enabled)) $langs->load("bills");
|
||||
|
||||
// Security check
|
||||
$socid = $_GET["socid"];
|
||||
|
||||
@ -472,7 +472,7 @@ class PaymentSocialContribution extends CommonObject
|
||||
|
||||
$error=0;
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
|
||||
@ -525,7 +525,7 @@ class Tva extends CommonObject
|
||||
if ($this->id > 0)
|
||||
{
|
||||
$ok=1;
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
// Insertion dans llx_bank
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
|
||||
@ -117,7 +117,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
||||
$description.='<br>';
|
||||
$description.=$langs->trans("RulesVATDueProducts");
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
//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");
|
||||
else $description.='<br>'.$langs->trans("DepositsAreIncluded");
|
||||
$description.=$fsearch;
|
||||
@ -147,7 +147,7 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.=' '.$langs->trans("DepositsAreNotIncluded");
|
||||
else $description.=' '.$langs->trans("DepositsAreIncluded");
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$builddate=time();
|
||||
|
||||
@ -172,7 +172,7 @@ if ($_GET["action"] == 'create')
|
||||
// Amount
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.$_POST["amount"].'"></td></tr>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Account").'</td><td>';
|
||||
$form->select_comptes($_POST["accountid"],"accountid",0,"courant=1",1); // Affiche liste des comptes courant
|
||||
@ -236,7 +236,7 @@ if ($id)
|
||||
|
||||
print '<tr><td>'.$langs->trans("Amount").'</td><td colspan="3">'.price($vatpayment->amount).'</td></tr>';
|
||||
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($vatpayment->fk_account > 0)
|
||||
{
|
||||
|
||||
@ -137,7 +137,7 @@ if ($modetax==1) // Calculate on invoice for goods and services
|
||||
$description.='<br>';
|
||||
$description.=$langs->trans("RulesVATDueProducts");
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
//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");
|
||||
else $description.='<br>'.$langs->trans("DepositsAreIncluded");
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
@ -174,7 +174,7 @@ if ($modetax==0) // Invoice for goods, payment for services
|
||||
if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description.=' '.$langs->trans("DepositsAreNotIncluded");
|
||||
else $description.=' '.$langs->trans("DepositsAreIncluded");
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE || $conf->global->MAIN_MODULE_ACCOUNTING) $description.='<br>'.img_warning().' '.$langs->trans('OptionVatInfoModuleComptabilite');
|
||||
//if ($conf->global->MAIN_MODULE_COMPTABILITE) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
//if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description.='<br>'.$langs->trans("WarningDepositsNotIncluded");
|
||||
$description.=$fsearch;
|
||||
$description.='<br>('.$langs->trans("TaxModuleSetupToModifyRules",DOL_URL_ROOT.'/admin/taxes.php').')';
|
||||
$builddate=time();
|
||||
|
||||
@ -310,7 +310,7 @@ abstract class ActionsContactCardCommon
|
||||
if ($action == 'view' || $action == 'edit' || $action == 'delete')
|
||||
{
|
||||
// Emailing
|
||||
if ($conf->mailing->enabled)
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
$langs->load("mails");
|
||||
$this->tpl['nb_emailing'] = $this->object->getNbOfEMailings();
|
||||
@ -322,25 +322,25 @@ abstract class ActionsContactCardCommon
|
||||
|
||||
$this->object->load_ref_elements();
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForOrders");
|
||||
$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_commande?$this->object->ref_commande:$langs->trans("NoContactForAnyOrder");
|
||||
$i++;
|
||||
}
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForProposals");
|
||||
$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_propal?$this->object->ref_propal:$langs->trans("NoContactForAnyProposal");
|
||||
$i++;
|
||||
}
|
||||
if ($conf->contrat->enabled)
|
||||
if (! empty($conf->contrat->enabled))
|
||||
{
|
||||
$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForContracts");
|
||||
$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_contrat?$this->object->ref_contrat:$langs->trans("NoContactForAnyContract");
|
||||
$i++;
|
||||
}
|
||||
if ($conf->facture->enabled)
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
$this->tpl['contact_element'][$i]['linked_element_label'] = $langs->trans("ContactForInvoices");
|
||||
$this->tpl['contact_element'][$i]['linked_element_value'] = $this->object->ref_facturation?$this->object->ref_facturation:$langs->trans("NoContactForAnyInvoice");
|
||||
|
||||
@ -658,28 +658,28 @@ else
|
||||
|
||||
$object->load_ref_elements();
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForOrders").'</td><td colspan="3">';
|
||||
print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
|
||||
print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->contrat->enabled)
|
||||
if (! empty($conf->contrat->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
|
||||
print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->facture->enabled)
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForInvoices").'</td><td colspan="3">';
|
||||
print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice");
|
||||
@ -744,7 +744,7 @@ else
|
||||
//array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External')))
|
||||
);
|
||||
$text=$langs->trans("ConfirmCreateContact").'<br>';
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
if ($object->socid > 0) $text.=$langs->trans("UserWillBeExternalUser");
|
||||
else $text.=$langs->trans("UserWillBeInternalUser");
|
||||
@ -823,7 +823,7 @@ else
|
||||
|
||||
// Email
|
||||
print '<tr><td>'.$langs->trans("EMail").'</td><td>'.dol_print_email($object->email,$object->id,$object->socid,'AC_EMAIL').'</td>';
|
||||
if ($conf->mailing->enabled)
|
||||
if (! empty($conf->mailing->enabled))
|
||||
{
|
||||
$langs->load("mails");
|
||||
print '<td nowrap>'.$langs->trans("NbOfEMailingsReceived").'</td>';
|
||||
@ -857,28 +857,28 @@ else
|
||||
|
||||
$object->load_ref_elements();
|
||||
|
||||
if ($conf->commande->enabled)
|
||||
if (! empty($conf->commande->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForOrders").'</td><td colspan="3">';
|
||||
print $object->ref_commande?$object->ref_commande:$langs->trans("NoContactForAnyOrder");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForProposals").'</td><td colspan="3">';
|
||||
print $object->ref_propal?$object->ref_propal:$langs->trans("NoContactForAnyProposal");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->contrat->enabled)
|
||||
if (! empty($conf->contrat->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForContracts").'</td><td colspan="3">';
|
||||
print $object->ref_contrat?$object->ref_contrat:$langs->trans("NoContactForAnyContract");
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->facture->enabled)
|
||||
if (! empty($conf->facture->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("ContactForInvoices").'</td><td colspan="3">';
|
||||
print $object->ref_facturation?$object->ref_facturation:$langs->trans("NoContactForAnyInvoice");
|
||||
|
||||
@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php';
|
||||
if (! empty($conf->produit->enabled) || ! empty($conf->service->enabled)) require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
if (! empty($conf->propal->enabled)) require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
|
||||
if ($conf->projet->enabled) {
|
||||
if (! empty($conf->projet->enabled)) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
|
||||
}
|
||||
@ -618,7 +618,7 @@ if ($action == 'create')
|
||||
$form->select_date($datecontrat,'',0,0,'',"contrat");
|
||||
print "</td></tr>";
|
||||
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr><td>'.$langs->trans("Project").'</td><td>';
|
||||
select_projects($soc->id,GETPOST("projectid"),"projectid");
|
||||
@ -767,7 +767,7 @@ else
|
||||
print '<td colspan="3">'.dol_print_date($object->date_contrat,"dayhour")."</td></tr>\n";
|
||||
|
||||
// Projet
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
$langs->load("projects");
|
||||
print '<tr><td>';
|
||||
@ -1276,7 +1276,7 @@ else
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td colspan="3">';
|
||||
// multiprix
|
||||
if($conf->global->PRODUIT_MULTIPRICES)
|
||||
if (! empty($conf->global->PRODUIT_MULTIPRICES))
|
||||
$form->select_produits('','idprod',1,$conf->product->limit_size,$object->thirdparty->price_level);
|
||||
else
|
||||
$form->select_produits('','idprod',1,$conf->product->limit_size);
|
||||
|
||||
@ -60,7 +60,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town']))
|
||||
$zipcode = $_GET['zipcode']?$_GET['zipcode']:'';
|
||||
$town = $_GET['town']?$_GET['town']:'';
|
||||
|
||||
if ($conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY) // Use zip-town table
|
||||
if (! empty($conf->global->MAIN_USE_ZIPTOWN_DICTIONNARY)) // Use zip-town table
|
||||
{
|
||||
$sql = "SELECT z.rowid, z.zip, z.town, z.fk_county, z.fk_pays as fk_country";
|
||||
$sql.= ", p.rowid as fk_country, p.code as country_code, p.libelle as country";
|
||||
|
||||
@ -93,7 +93,7 @@ class box_produits extends ModeleBoxes
|
||||
$datem=$db->jdate($objp->tms);
|
||||
|
||||
// Multilangs
|
||||
if ($conf->global->MAIN_MULTILANGS) // si l'option est active
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) // si l'option est active
|
||||
{
|
||||
$sqld = "SELECT label";
|
||||
$sqld.= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||
|
||||
@ -105,7 +105,7 @@ class box_services_contracts extends ModeleBoxes
|
||||
$datem=$db->jdate($objp->datem);
|
||||
|
||||
// Multilangs
|
||||
if ($conf->global->MAIN_MULTILANGS) // si l'option est active
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) // si l'option est active
|
||||
{
|
||||
$sqld = "SELECT label";
|
||||
$sqld.= " FROM ".MAIN_DB_PREFIX."product_lang";
|
||||
|
||||
@ -1050,7 +1050,7 @@ class CMailFile
|
||||
}
|
||||
if ($format == 0 || $format == 3)
|
||||
{
|
||||
if ($conf->global->MAIN_MAIL_NO_FULL_EMAIL) $newemail='<'.$email.'>';
|
||||
if (! empty($conf->global->MAIN_MAIL_NO_FULL_EMAIL)) $newemail='<'.$email.'>';
|
||||
elseif (! $name) $newemail='<'.$email.'>';
|
||||
else $newemail=($format==3?'"':'').($encode?$this->encodetorfc2822($name):$name).($format==3?'"':'').' <'.$email.'>';
|
||||
}
|
||||
|
||||
@ -2959,9 +2959,9 @@ abstract class CommonObject
|
||||
print '<td width="20%" align="right">'.$langs->trans('SellingPrice').'</td>';
|
||||
print '<td width="20%" align="right">'.$langs->trans('BuyingPrice').'</td>';
|
||||
print '<td width="20%" align="right">'.$langs->trans('Margin').'</td>';
|
||||
if($conf->global->DISPLAY_MARGIN_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print '<td align="right">'.$langs->trans('MarginRate').'</td>';
|
||||
if($conf->global->DISPLAY_MARK_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print '<td align="right">'.$langs->trans('MarkRate').'</td>';
|
||||
print '</tr>';
|
||||
//if ($marginInfo['margin_on_products'] != 0 && $marginInfo['margin_on_services'] != 0) {
|
||||
@ -2970,9 +2970,9 @@ abstract class CommonObject
|
||||
print '<td align="right">'.price($marginInfo['pv_products']).'</td>';
|
||||
print '<td align="right">'.price($marginInfo['pa_products']).'</td>';
|
||||
print '<td align="right">'.price($marginInfo['margin_on_products']).'</td>';
|
||||
if($conf->global->DISPLAY_MARGIN_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print '<td align="right">'.(($marginInfo['margin_rate_products'] == '')?'n/a':price($marginInfo['margin_rate_products']).'%').'</td>';
|
||||
if($conf->global->DISPLAY_MARK_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print '<td align="right">'.(($marginInfo['mark_rate_products'] == '')?'n/a':price($marginInfo['mark_rate_products']).'%').'</td>';
|
||||
print '</tr>';
|
||||
print '<tr class="pair">';
|
||||
@ -2980,9 +2980,9 @@ abstract class CommonObject
|
||||
print '<td align="right">'.price($marginInfo['pv_services']).'</td>';
|
||||
print '<td align="right">'.price($marginInfo['pa_services']).'</td>';
|
||||
print '<td align="right">'.price($marginInfo['margin_on_services']).'</td>';
|
||||
if($conf->global->DISPLAY_MARGIN_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print '<td align="right">'.(($marginInfo['margin_rate_services'] == '')?'n/a':price($marginInfo['margin_rate_services']).'%').'</td>';
|
||||
if($conf->global->DISPLAY_MARK_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print '<td align="right">'.(($marginInfo['mark_rate_services'] == '')?'n/a':price($marginInfo['mark_rate_services']).'%').'</td>';
|
||||
print '</tr>';
|
||||
//}
|
||||
@ -2991,9 +2991,9 @@ abstract class CommonObject
|
||||
print '<td align="right">'.price($marginInfo['pv_total']).'</td>';
|
||||
print '<td align="right">'.price($marginInfo['pa_total']).'</td>';
|
||||
print '<td align="right">'.price($marginInfo['total_margin']).'</td>';
|
||||
if($conf->global->DISPLAY_MARGIN_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARGIN_RATES))
|
||||
print '<td align="right">'.(($marginInfo['total_margin_rate'] == '')?'n/a':price($marginInfo['total_margin_rate']).'%').'</td>';
|
||||
if($conf->global->DISPLAY_MARK_RATES)
|
||||
if (! empty($conf->global->DISPLAY_MARK_RATES))
|
||||
print '<td align="right">'.(($marginInfo['total_mark_rate'] == '')?'n/a':price($marginInfo['total_mark_rate']).'%').'</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -65,7 +65,7 @@ class FormFile
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
if ($conf->global->MAIN_USE_JQUERY_FILEUPLOAD)
|
||||
if (! empty($conf->global->MAIN_USE_JQUERY_FILEUPLOAD))
|
||||
{
|
||||
return $this->_formAjaxFileUpload($object);
|
||||
}
|
||||
|
||||
@ -107,8 +107,8 @@ class Ldap
|
||||
global $conf;
|
||||
|
||||
//Server
|
||||
if ($conf->global->LDAP_SERVER_HOST) $this->server[] = $conf->global->LDAP_SERVER_HOST;
|
||||
if ($conf->global->LDAP_SERVER_HOST_SLAVE) $this->server[] = $conf->global->LDAP_SERVER_HOST_SLAVE;
|
||||
if (! empty($conf->global->LDAP_SERVER_HOST)) $this->server[] = $conf->global->LDAP_SERVER_HOST;
|
||||
if (! empty($conf->global->LDAP_SERVER_HOST_SLAVE)) $this->server[] = $conf->global->LDAP_SERVER_HOST_SLAVE;
|
||||
$this->serverPort = $conf->global->LDAP_SERVER_PORT;
|
||||
$this->ldapProtocolVersion = $conf->global->LDAP_SERVER_PROTOCOLVERSION;
|
||||
$this->dn = $conf->global->LDAP_SERVER_DN;
|
||||
|
||||
@ -97,7 +97,7 @@ function print_actions_filter($form,$canedit,$status,$year,$month,$day,$showbirt
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
if ($conf->projet->enabled)
|
||||
if (! empty($conf->projet->enabled))
|
||||
{
|
||||
print '<tr>';
|
||||
print '<td nowrap="nowrap">';
|
||||
|
||||
@ -510,7 +510,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
|
||||
|
||||
$contactstatic = new Contact($db);
|
||||
|
||||
if ($conf->clicktodial->enabled)
|
||||
if (! empty($conf->clicktodial->enabled))
|
||||
{
|
||||
$user->fetch_clicktodial(); // lecture des infos de clicktodial
|
||||
}
|
||||
@ -729,7 +729,7 @@ function show_actions_todo($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
$now=dol_now();
|
||||
$out='';
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
$actionstatic=new ActionComm($db);
|
||||
@ -891,7 +891,7 @@ function show_actions_done($conf,$langs,$db,$object,$objcon='',$noprint=0)
|
||||
$numaction = 0 ;
|
||||
$now=dol_now();
|
||||
|
||||
if ($conf->agenda->enabled)
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
// Recherche histo sur actioncomm
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
|
||||
@ -57,7 +57,7 @@ function facture_prepare_head($object)
|
||||
}
|
||||
|
||||
//if ($fac->mode_reglement_code == 'PRE')
|
||||
if ($conf->prelevement->enabled)
|
||||
if (! empty($conf->prelevement->enabled))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$object->id;
|
||||
$head[$h][1] = $langs->trans('StandingOrders');
|
||||
|
||||
@ -41,7 +41,7 @@ function ldap_prepare_head()
|
||||
$head[$h][2] = 'ldap';
|
||||
$h++;
|
||||
|
||||
if ($conf->global->LDAP_SYNCHRO_ACTIVE)
|
||||
if (! empty($conf->global->LDAP_SYNCHRO_ACTIVE))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/ldap_users.php";
|
||||
$head[$h][1] = $langs->trans("LDAPUsersSynchro");
|
||||
@ -49,7 +49,7 @@ function ldap_prepare_head()
|
||||
$h++;
|
||||
}
|
||||
|
||||
if ($conf->global->LDAP_SYNCHRO_ACTIVE)
|
||||
if (! empty($conf->global->LDAP_SYNCHRO_ACTIVE))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/ldap_groups.php";
|
||||
$head[$h][1] = $langs->trans("LDAPGroupsSynchro");
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
function commande_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
if ($conf->expedition->enabled) $langs->load("sendings");
|
||||
if (! empty($conf->expedition->enabled)) $langs->load("sendings");
|
||||
$langs->load("orders");
|
||||
|
||||
$h = 0;
|
||||
|
||||
@ -668,7 +668,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
|
||||
{
|
||||
$pdf->SetXY($dims['lm'],-$posy);
|
||||
$width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
|
||||
if ($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT) { $width=200; $align='C'; }
|
||||
if (! empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) { $width=200; $align='C'; }
|
||||
$pdf->MultiCell($width, 3, $line, 0, $align, 0);
|
||||
$posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ function product_prepare_head($object, $user)
|
||||
}
|
||||
|
||||
// Multilangs
|
||||
if($conf->global->MAIN_MULTILANGS)
|
||||
if (! empty($conf->global->MAIN_MULTILANGS))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/traduction.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans("Translation");
|
||||
@ -81,7 +81,7 @@ function product_prepare_head($object, $user)
|
||||
}
|
||||
|
||||
// Sub products
|
||||
if($conf->global->PRODUIT_SOUSPRODUITS)
|
||||
if (! empty($conf->global->PRODUIT_SOUSPRODUITS))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT."/product/composition/fiche.php?id=".$object->id;
|
||||
$head[$h][1] = $langs->trans('AssociatedProducts');
|
||||
|
||||
@ -432,7 +432,7 @@ function getRandomPassword($generic=false)
|
||||
|
||||
$generated_password='';
|
||||
if ($generic) $generated_password=dol_hash(mt_rand());
|
||||
else if ($conf->global->USER_PASSWORD_GENERATED)
|
||||
else if (! empty($conf->global->USER_PASSWORD_GENERATED))
|
||||
{
|
||||
$nomclass="modGeneratePass".ucfirst($conf->global->USER_PASSWORD_GENERATED);
|
||||
$nomfichier=$nomclass.".class.php";
|
||||
|
||||
@ -52,7 +52,7 @@ function stock_prepare_head($object)
|
||||
*/
|
||||
|
||||
/* Disabled because will never be implemented. Table always empty.
|
||||
if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER)
|
||||
if (! empty($conf->global->STOCK_USE_WAREHOUSE_BY_USER))
|
||||
{
|
||||
// Should not be enabled by defaut because does not work yet correctly because
|
||||
// personnal stocks are not tagged into table llx_entrepot
|
||||
|
||||
@ -106,7 +106,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
||||
if ($modetax == 1)
|
||||
{
|
||||
// If vat paid on due invoices (non draft)
|
||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
|
||||
{
|
||||
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||
// n'est pas stocke dans la table des payments.
|
||||
@ -115,7 +115,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
||||
// detail part tva et part ht).
|
||||
$sql = 'TODO';
|
||||
}
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE)
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
$sql = "SELECT s.rowid as socid, s.nom as nom, s.siren as tva_intra, s.tva_assuj as assuj,";
|
||||
$sql.= " sum(fd.total_ht) as amount, sum(fd.".$total_tva.") as tva,";
|
||||
@ -145,7 +145,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
|
||||
{
|
||||
// If vat paid on payments
|
||||
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||
@ -155,7 +155,7 @@ function vat_by_thirdparty($db, $y, $date_start, $date_end, $modetax, $direction
|
||||
// detail part tva et part ht).
|
||||
$sql = 'TODO';
|
||||
}
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE)
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
// Tva sur factures payes (should be on payment)
|
||||
/* $sql = "SELECT s.rowid as socid, s.nom as nom, s.tva_intra as tva_intra, s.tva_assuj as assuj,";
|
||||
@ -262,7 +262,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
$sql='';
|
||||
if ($modetax == 1) // Option vat on delivery for goods (payment) and debit invoice for services
|
||||
{
|
||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
|
||||
{
|
||||
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||
// n'est pas stocke dans la table des payments.
|
||||
@ -271,7 +271,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
// detail part tva et part ht).
|
||||
$sql='TODO';
|
||||
}
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE)
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
// Count on delivery date (use invoice date as delivery is unknown)
|
||||
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
|
||||
@ -307,7 +307,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
}
|
||||
else // Option vat on delivery for goods (payments) and payments for services
|
||||
{
|
||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
|
||||
{
|
||||
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||
// n'est pas stocke dans la table des payments.
|
||||
@ -316,7 +316,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
// detail part tva et part ht).
|
||||
$sql='TODO';
|
||||
}
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE)
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
// Count on delivery date (use invoice date as delivery is unknown)
|
||||
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
|
||||
@ -419,7 +419,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
$sql='';
|
||||
if ($modetax == 1) // Option vat on delivery for goods (payment) and debit invoice for services
|
||||
{
|
||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
|
||||
{
|
||||
// Count on invoice date
|
||||
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||
@ -429,7 +429,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
// detail part tva et part ht).
|
||||
$sql='TODO';
|
||||
}
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE)
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
// Count on invoice date
|
||||
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
|
||||
@ -465,7 +465,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
}
|
||||
else // Option vat on delivery for goods (payments) and payments for services
|
||||
{
|
||||
if ($conf->global->MAIN_MODULE_ACCOUNTING)
|
||||
if (! empty($conf->global->MAIN_MODULE_ACCOUNTING))
|
||||
{
|
||||
// Count on payments date
|
||||
// TODO a ce jour on se sait pas la compter car le montant tva d'un payment
|
||||
@ -475,7 +475,7 @@ function vat_by_date($db, $y, $q, $date_start, $date_end, $modetax, $direction,
|
||||
// detail part tva et part ht).
|
||||
$sql='TODO';
|
||||
}
|
||||
if ($conf->global->MAIN_MODULE_COMPTABILITE)
|
||||
if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||
{
|
||||
// Count on payments date
|
||||
$sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.tva_tx as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,";
|
||||
|
||||
@ -124,9 +124,9 @@ function print_eldy_menu($db,$atarget,$type_user)
|
||||
$classname = 'class="tmenu"';
|
||||
}
|
||||
$chaine="";
|
||||
if ($conf->product->enabled) { $chaine.=$langs->trans("Products"); }
|
||||
if (! empty($conf->product->enabled)) { $chaine.=$langs->trans("Products"); }
|
||||
if ($conf->product->enabled && $conf->service->enabled) { $chaine.="/"; }
|
||||
if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); }
|
||||
if (! empty($conf->service->enabled)) { $chaine.=$langs->trans("Services"); }
|
||||
|
||||
$idsel='products';
|
||||
if ($user->rights->produit->lire || $user->rights->service->lire)
|
||||
@ -738,7 +738,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
if ($mainmenu == 'companies')
|
||||
{
|
||||
// Societes
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
$langs->load("companies");
|
||||
$newmenu->add("/societe/index.php?leftmenu=thirdparties", $langs->trans("ThirdParty"), 0, $user->rights->societe->lire, '', $mainmenu, 'thirdparties');
|
||||
@ -767,7 +767,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
}
|
||||
|
||||
// Clients
|
||||
if ($conf->societe->enabled)
|
||||
if (! empty($conf->societe->enabled))
|
||||
{
|
||||
$langs->load("commercial");
|
||||
$newmenu->add("/comm/list.php?leftmenu=customers", $langs->trans("ListCustomersShort"), 1, $user->rights->societe->lire, '', $mainmenu, 'customers');
|
||||
@ -796,12 +796,12 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
$newmenu->add("/contact/list.php?leftmenu=contacts", $langs->trans("List"), 1, $user->rights->societe->contact->lire);
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=p", $langs->trans("Prospects"), 2, $user->rights->societe->contact->lire);
|
||||
$newmenu->add("/contact/list.php?leftmenu=contacts&type=c", $langs->trans("Customers"), 2, $user->rights->societe->contact->lire);
|
||||
if ($conf->fournisseur->enabled) $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
|
||||
if (! empty($conf->fournisseur->enabled)) $newmenu->add("/contact/list.php?leftmenu=contacts&type=f", $langs->trans("Suppliers"), 2, $user->rights->societe->contact->lire);
|
||||
$newmenu->add("/contact/list.php?leftmenu=contacts&type=o", $langs->trans("Others"), 2, $user->rights->societe->contact->lire);
|
||||
//$newmenu->add("/contact/list.php?userid=$user->id", $langs->trans("MyContacts"), 1, $user->rights->societe->contact->lire);
|
||||
|
||||
// Categories
|
||||
if ($conf->categorie->enabled)
|
||||
if (! empty($conf->categorie->enabled))
|
||||
{
|
||||
$langs->load("categories");
|
||||
// Categories prospects/customers
|
||||
@ -811,7 +811,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
$newmenu->add("/categories/fiche.php?action=create&type=2", $langs->trans("NewCategory"), 1, $user->rights->categorie->creer);
|
||||
}
|
||||
// Categories suppliers
|
||||
if ($conf->fournisseur->enabled)
|
||||
if (! empty($conf->fournisseur->enabled))
|
||||
{
|
||||
$newmenu->add("/categories/index.php?leftmenu=cat&type=1", $langs->trans("SuppliersCategoriesShort"), 0, $user->rights->categorie->lire);
|
||||
if (empty($user->societe_id))
|
||||
@ -1047,7 +1047,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
|
||||
/*
|
||||
if ($leftmenu=="ca") $newmenu->add("/compta/stats/cumul.php?leftmenu=ca","Cumule",2,$user->rights->compta->resultat->lire);
|
||||
if ($conf->propal->enabled) {
|
||||
if (! empty($conf->propal->enabled)) {
|
||||
if ($leftmenu=="ca") $newmenu->add("/compta/stats/prev.php?leftmenu=ca","Previsionnel",2,$user->rights->compta->resultat->lire);
|
||||
if ($leftmenu=="ca") $newmenu->add("/compta/stats/comp.php?leftmenu=ca","Transforme",2,$user->rights->compta->resultat->lire);
|
||||
}
|
||||
@ -1129,11 +1129,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
$newmenu->add("/product/fiche.php?leftmenu=product&action=create&type=0", $langs->trans("NewProduct"), 1, $user->rights->produit->creer);
|
||||
$newmenu->add("/product/liste.php?leftmenu=product&type=0", $langs->trans("List"), 1, $user->rights->produit->lire);
|
||||
}
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$newmenu->add("/product/popuprop.php?leftmenu=stats&type=0", $langs->trans("Statistics"), 1, $user->rights->produit->lire && $user->rights->propale->lire);
|
||||
}
|
||||
if ($conf->stock->enabled)
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
$newmenu->add("/product/reassort.php?type=0", $langs->trans("Stocks"), 1, $user->rights->produit->lire && $user->rights->stock->lire);
|
||||
}
|
||||
@ -1148,7 +1148,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
|
||||
$newmenu->add("/product/fiche.php?leftmenu=service&action=create&type=1", $langs->trans("NewService"), 1, $user->rights->service->creer);
|
||||
}
|
||||
$newmenu->add("/product/liste.php?leftmenu=service&type=1", $langs->trans("List"), 1, $user->rights->service->lire);
|
||||
if ($conf->propal->enabled)
|
||||
if (! empty($conf->propal->enabled))
|
||||
{
|
||||
$newmenu->add("/product/popuprop.php?leftmenu=stats&type=1", $langs->trans("Statistics"), 1, $user->rights->service->lire && $user->rights->propale->lire);
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
|
||||
// Positionne modele sur le nom du modele a utiliser
|
||||
if (! dol_strlen($modele))
|
||||
{
|
||||
if ($conf->global->FACTURE_ADDON_PDF)
|
||||
if (! empty($conf->global->FACTURE_ADDON_PDF))
|
||||
{
|
||||
$modele = $conf->global->FACTURE_ADDON_PDF;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user