Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop Conflicts: htdocs/core/tpl/freeproductline_create.tpl.php htdocs/core/tpl/predefinedproductline_create.tpl.php
This commit is contained in:
commit
9147911ae4
@ -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>';
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($conf->banque->enabled && $_POST["paymentsave"] != 'none')
|
||||
if (! empty($conf->banque->enabled) && $_POST["paymentsave"] != 'none')
|
||||
{
|
||||
if ($_POST["cotisation"])
|
||||
{
|
||||
@ -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);
|
||||
@ -740,8 +740,8 @@ if ($rowid)
|
||||
$bankdirect=0; // Option to write to bank is on by default
|
||||
$bankviainvoice=0; // Option to write via invoice is on by default
|
||||
$invoiceonly=0;
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE && (empty($_POST['paymentsave']) || $_POST["paymentsave"] == 'bankdirect')) $bankdirect=1;
|
||||
if ($conf->banque->enabled && $conf->societe->enabled && $conf->facture->enabled && $object->fk_soc) $bankviainvoice=1;
|
||||
if (! empty($conf->banque->enabled) && $conf->global->ADHERENT_BANK_USE && (empty($_POST['paymentsave']) || $_POST["paymentsave"] == 'bankdirect')) $bankdirect=1;
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled) && $object->fk_soc) $bankviainvoice=1;
|
||||
|
||||
print "\n\n<!-- Form add subscription -->\n";
|
||||
|
||||
@ -873,7 +873,7 @@ if ($rowid)
|
||||
print dol_print_date(($datefrom?$datefrom:time()),"%Y").'" ></td></tr>';
|
||||
|
||||
// Complementary action
|
||||
if ($conf->banque->enabled || $conf->facture->enabled)
|
||||
if (! empty($conf->banque->enabled) || ! empty($conf->facture->enabled))
|
||||
{
|
||||
$company=new Societe($db);
|
||||
if ($object->fk_soc)
|
||||
@ -889,12 +889,12 @@ 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>';
|
||||
}
|
||||
if ($conf->societe->enabled && $conf->facture->enabled)
|
||||
if (! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="invoiceonly" name="paymentsave" value="invoiceonly"'.($invoiceonly?' checked="checked"':'');
|
||||
if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
|
||||
@ -909,7 +909,7 @@ if ($rowid)
|
||||
}
|
||||
print '<br>';
|
||||
}
|
||||
if ($conf->banque->enabled && $conf->societe->enabled && $conf->facture->enabled)
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled))
|
||||
{
|
||||
print '<input type="radio" class="moreaction" id="bankviainvoice" name="paymentsave" value="bankviainvoice"'.($bankviainvoice?' checked="checked"':'');
|
||||
if (empty($object->fk_soc) || empty($bankviainvoice)) print ' disabled="disabled"';
|
||||
|
||||
@ -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);
|
||||
@ -1382,7 +1382,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
// spip
|
||||
if ($conf->global->ADHERENT_USE_SPIP && $conf->mailmanspip->enabled)
|
||||
if ($conf->global->ADHERENT_USE_SPIP && ! empty($conf->mailmanspip->enabled))
|
||||
{
|
||||
$result=$mailmanspip->add_to_spip($this);
|
||||
if ($result < 0)
|
||||
@ -1427,7 +1427,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
if ($conf->global->ADHERENT_USE_SPIP && $conf->mailmanspip->enabled)
|
||||
if ($conf->global->ADHERENT_USE_SPIP && ! empty($conf->mailmanspip->enabled))
|
||||
{
|
||||
$result=$mailmanspip->del_to_spip($this);
|
||||
if ($result < 0)
|
||||
@ -1787,31 +1787,31 @@ class Adherent extends CommonObject
|
||||
$this->fullname=$this->getFullName($langs);
|
||||
|
||||
// Member
|
||||
if ($this->fullname && $conf->global->LDAP_MEMBER_FIELD_FULLNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->nom && $conf->global->LDAP_MEMBER_FIELD_NAME) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom;
|
||||
if ($this->prenom && $conf->global->LDAP_MEMBER_FIELD_FIRSTNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
|
||||
if ($this->login && $conf->global->LDAP_MEMBER_FIELD_LOGIN) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
|
||||
if ($this->pass && $conf->global->LDAP_MEMBER_FIELD_PASSWORD) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
||||
if ($this->poste && $conf->global->LDAP_MEMBER_FIELD_TITLE) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
|
||||
if ($this->adresse && $conf->global->LDAP_MEMBER_FIELD_ADDRESS) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->adresse;
|
||||
if ($this->cp && $conf->global->LDAP_MEMBER_FIELD_ZIP) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp;
|
||||
if ($this->ville && $conf->global->LDAP_MEMBER_FIELD_TOWN) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville;
|
||||
if ($this->country_code && $conf->global->LDAP_MEMBER_FIELD_COUNTRY) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
|
||||
if ($this->email && $conf->global->LDAP_MEMBER_FIELD_MAIL) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
|
||||
if ($this->phone && $conf->global->LDAP_MEMBER_FIELD_PHONE) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
|
||||
if ($this->phone_perso && $conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
|
||||
if ($this->phone_mobile && $conf->global->LDAP_MEMBER_FIELD_MOBILE) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
||||
if ($this->fax && $conf->global->LDAP_MEMBER_FIELD_FAX) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
|
||||
if ($this->note && $conf->global->LDAP_MEMBER_FIELD_DESCRIPTION) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note;
|
||||
if ($this->naiss && $conf->global->LDAP_MEMBER_FIELD_BIRTHDATE) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->naiss,'dayhourldap');
|
||||
if (isset($this->statut) && $conf->global->LDAP_FIELD_MEMBER_STATUS) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
|
||||
if ($this->datefin && $conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');
|
||||
if ($this->fullname && ! empty($conf->global->LDAP_MEMBER_FIELD_FULLNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->nom && ! empty($conf->global->LDAP_MEMBER_FIELD_NAME)) $info[$conf->global->LDAP_MEMBER_FIELD_NAME] = $this->nom;
|
||||
if ($this->prenom && ! empty($conf->global->LDAP_MEMBER_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_MEMBER_FIELD_FIRSTNAME] = $this->prenom;
|
||||
if ($this->login && ! empty($conf->global->LDAP_MEMBER_FIELD_LOGIN)) $info[$conf->global->LDAP_MEMBER_FIELD_LOGIN] = $this->login;
|
||||
if ($this->pass && ! empty($conf->global->LDAP_MEMBER_FIELD_PASSWORD)) $info[$conf->global->LDAP_MEMBER_FIELD_PASSWORD] = $this->pass; // this->pass = mot de passe non crypte
|
||||
if ($this->poste && ! empty($conf->global->LDAP_MEMBER_FIELD_TITLE)) $info[$conf->global->LDAP_MEMBER_FIELD_TITLE] = $this->poste;
|
||||
if ($this->adresse && ! empty($conf->global->LDAP_MEMBER_FIELD_ADDRESS)) $info[$conf->global->LDAP_MEMBER_FIELD_ADDRESS] = $this->adresse;
|
||||
if ($this->cp && ! empty($conf->global->LDAP_MEMBER_FIELD_ZIP)) $info[$conf->global->LDAP_MEMBER_FIELD_ZIP] = $this->cp;
|
||||
if ($this->ville && ! empty($conf->global->LDAP_MEMBER_FIELD_TOWN)) $info[$conf->global->LDAP_MEMBER_FIELD_TOWN] = $this->ville;
|
||||
if ($this->country_code && ! empty($conf->global->LDAP_MEMBER_FIELD_COUNTRY)) $info[$conf->global->LDAP_MEMBER_FIELD_COUNTRY] = $this->country_code;
|
||||
if ($this->email && ! empty($conf->global->LDAP_MEMBER_FIELD_MAIL)) $info[$conf->global->LDAP_MEMBER_FIELD_MAIL] = $this->email;
|
||||
if ($this->phone && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE] = $this->phone;
|
||||
if ($this->phone_perso && ! empty($conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO)) $info[$conf->global->LDAP_MEMBER_FIELD_PHONE_PERSO] = $this->phone_perso;
|
||||
if ($this->phone_mobile && ! empty($conf->global->LDAP_MEMBER_FIELD_MOBILE)) $info[$conf->global->LDAP_MEMBER_FIELD_MOBILE] = $this->phone_mobile;
|
||||
if ($this->fax && ! empty($conf->global->LDAP_MEMBER_FIELD_FAX)) $info[$conf->global->LDAP_MEMBER_FIELD_FAX] = $this->fax;
|
||||
if ($this->note && ! empty($conf->global->LDAP_MEMBER_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_MEMBER_FIELD_DESCRIPTION] = $this->note;
|
||||
if ($this->naiss && ! empty($conf->global->LDAP_MEMBER_FIELD_BIRTHDATE)) $info[$conf->global->LDAP_MEMBER_FIELD_BIRTHDATE] = dol_print_date($this->naiss,'dayhourldap');
|
||||
if (isset($this->statut) && ! empty($conf->global->LDAP_FIELD_MEMBER_STATUS)) $info[$conf->global->LDAP_FIELD_MEMBER_STATUS] = $this->statut;
|
||||
if ($this->datefin && ! empty($conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION)) $info[$conf->global->LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION] = dol_print_date($this->datefin,'dayhourldap');
|
||||
|
||||
// Subscriptions
|
||||
if ($this->first_subscription_date && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dol_print_date($this->first_subscription_date,'dayhourldap');
|
||||
if (isset($this->first_subscription_amount) && $conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT] = $this->first_subscription_amount;
|
||||
if ($this->last_subscription_date && $conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE] = dol_print_date($this->last_subscription_date,'dayhourldap');
|
||||
if (isset($this->last_subscription_amount) && $conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT] = $this->last_subscription_amount;
|
||||
if ($this->first_subscription_date && ! empty($conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE)) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE] = dol_print_date($this->first_subscription_date,'dayhourldap');
|
||||
if (isset($this->first_subscription_amount) && ! empty($conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT)) $info[$conf->global->LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT] = $this->first_subscription_amount;
|
||||
if ($this->last_subscription_date && ! empty($conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE)) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE] = dol_print_date($this->last_subscription_date,'dayhourldap');
|
||||
if (isset($this->last_subscription_amount) && ! empty($conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT)) $info[$conf->global->LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT] = $this->last_subscription_amount;
|
||||
|
||||
return $info;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
@ -131,7 +131,7 @@ if ($result)
|
||||
|
||||
$var=!$var;
|
||||
|
||||
if ($allowinsertbankafter && ! $objp->fk_account && $conf->banque->enabled && $objp->cotisation)
|
||||
if ($allowinsertbankafter && ! $objp->fk_account && ! empty($conf->banque->enabled) && $objp->cotisation)
|
||||
{
|
||||
print "<form method=\"post\" action=\"cotisations.php\">";
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -153,7 +153,7 @@ if ($result)
|
||||
print '</td>';
|
||||
|
||||
// Banque
|
||||
if ($conf->banque->enabled)
|
||||
if (! empty($conf->banque->enabled))
|
||||
{
|
||||
if ($objp->fk_account)
|
||||
{
|
||||
@ -193,7 +193,7 @@ if ($result)
|
||||
print '<td align="right">'.price($objp->cotisation).'</td>';
|
||||
|
||||
print "</tr>";
|
||||
if ($allowinsertbankafter && ! $objp->fk_account && $conf->banque->enabled && $objp->cotisation)
|
||||
if ($allowinsertbankafter && ! $objp->fk_account && ! empty($conf->banque->enabled) && $objp->cotisation)
|
||||
{
|
||||
print "</form>\n";
|
||||
}
|
||||
@ -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>';
|
||||
@ -1532,7 +1532,7 @@ if ($rowid && $action != 'edit')
|
||||
}
|
||||
|
||||
// Create third party
|
||||
if ($conf->societe->enabled && ! $object->fk_soc)
|
||||
if (! empty($conf->societe->enabled) && ! $object->fk_soc)
|
||||
{
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
@ -1570,7 +1570,7 @@ if ($rowid && $action != 'edit')
|
||||
}
|
||||
|
||||
// Action SPIP
|
||||
if ($conf->mailmanspip->enabled && $conf->global->ADHERENT_USE_SPIP)
|
||||
if (! empty($conf->mailmanspip->enabled) && ! empty($conf->global->ADHERENT_USE_SPIP))
|
||||
{
|
||||
$isinspip = $mailmanspip->is_in_spip($object);
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ if ($user->rights->adherent->cotisation->creer && $_REQUEST["action"] == 'update
|
||||
// If transaction consolidated
|
||||
if ($accountline->rappro)
|
||||
{
|
||||
$errmsg=$langs->trans("SubscriptionLinkedToConciliatedTrnasaction");
|
||||
$errmsg=$langs->trans("SubscriptionLinkedToConciliatedTransaction");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -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)
|
||||
{
|
||||
@ -290,7 +290,7 @@ if ($rowid && $action != 'edit')
|
||||
//$formquestion=array();
|
||||
//$formquestion['text']='<b>'.$langs->trans("ThisWillAlsoDeleteBankRecord").'</b>';
|
||||
$text=$langs->trans("ConfirmDeleteSubscription");
|
||||
if ($conf->banque->enabled && $conf->global->ADHERENT_BANK_USE) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
||||
if (! empty($conf->banque->enabled) && ! empty($conf->global->ADHERENT_BANK_USE)) $text.='<br>'.img_warning().' '.$langs->trans("ThisWillAlsoDeleteBankRecord");
|
||||
$ret=$form->form_confirm($_SERVER["PHP_SELF"]."?rowid=".$subscription->id,$langs->trans("DeleteSubscription"),$text,"confirm_delete",$formquestion,0,1);
|
||||
if ($ret == 'html') print '<br>';
|
||||
}
|
||||
@ -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";
|
||||
|
||||
@ -69,7 +69,7 @@ foreach($modules as $const => $desc)
|
||||
{
|
||||
dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1",'chaine',0,'',$conf->entity);
|
||||
// Si fckeditor est active dans la description produit/service, on l'active dans les formulaires
|
||||
if ($const == 'PRODUCTDESC' && $conf->global->PRODUIT_DESC_IN_FORM)
|
||||
if ($const == 'PRODUCTDESC' && ! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
||||
{
|
||||
dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
@ -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>';
|
||||
}
|
||||
@ -269,7 +269,7 @@ if (function_exists("ldap_connect"))
|
||||
print '<font class="ok">'.$langs->trans("LDAPTCPConnectOK",$conf->global->LDAP_SERVER_HOST,$conf->global->LDAP_SERVER_PORT).'</font>';
|
||||
print '<br>';
|
||||
|
||||
if ($conf->global->LDAP_ADMIN_DN && $conf->global->LDAP_ADMIN_PASS)
|
||||
if ($conf->global->LDAP_ADMIN_DN && ! empty($conf->global->LDAP_ADMIN_PASS))
|
||||
{
|
||||
if ($result == 2)
|
||||
{
|
||||
|
||||
@ -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>';
|
||||
}
|
||||
|
||||
@ -252,19 +252,19 @@ $categidx='expdev';
|
||||
if (! empty($categ[$categidx]))
|
||||
{
|
||||
$form = new Form($db);
|
||||
$categidx='expdev';
|
||||
$categidx='expdev';
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
|
||||
$head[$h][2] = 'expdev';
|
||||
$h++;
|
||||
$head[$h][1] = $form->textwithpicto($langs->trans("ModuleFamilyExperimental"), $langs->trans('DoNotUseInProduction'), 1, 'warning', '', 0, 3);
|
||||
$head[$h][2] = 'expdev';
|
||||
$h++;
|
||||
}
|
||||
|
||||
$categidx='marketplace';
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||
$head[$h][1] = $langs->trans("ModulesMarketPlaces");
|
||||
$head[$h][2] = 'marketplace';
|
||||
$h++;
|
||||
|
||||
$categidx='marketplace';
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/modules.php?mode=".$categidx;
|
||||
$head[$h][1] = $langs->trans("ModulesMarketPlaces");
|
||||
$head[$h][2] = 'marketplace';
|
||||
$h++;
|
||||
|
||||
|
||||
dol_fiche_head($head, $mode, $langs->trans("Modules"));
|
||||
|
||||
|
||||
@ -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"' : '';
|
||||
|
||||
@ -66,7 +66,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
|
||||
// Security check
|
||||
if (! $conf->clicktodial->enabled)
|
||||
if (empty($conf->clicktodial->enabled))
|
||||
{
|
||||
accessforbidden();
|
||||
exit;
|
||||
|
||||
@ -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]))
|
||||
{
|
||||
|
||||
@ -30,14 +30,14 @@ if ( $_GET['filtre'] ) {
|
||||
$ret=array(); $i=0;
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.label, p.tva_tx, p.fk_product_type";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
$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";
|
||||
@ -67,9 +67,9 @@ if ( $_GET['filtre'] ) {
|
||||
$i=0;
|
||||
|
||||
$sql = "SELECT p.rowid, ref, label, tva_tx, p.fk_product_type";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
$sql.= " AND p.tosell = 1";
|
||||
if(!$conf->global->CASHDESK_SERVICES) $sql.= " AND p.fk_product_type = 0";
|
||||
|
||||
@ -44,9 +44,9 @@ header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
if (dol_strlen($_GET["code"]) >= 0) // If search criteria is on char length at least
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.label, p.tva_tx";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'";
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
$sql.= " AND p.tosell = 1";
|
||||
$sql.= " AND p.fk_product_type = 0";
|
||||
|
||||
@ -32,9 +32,9 @@ switch ( $_GET['action'] )
|
||||
if ( $_POST['hdnSource'] != 'NULL' )
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.price, p.tva_tx";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = ".$conf_fkentrepot;
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = ".$conf_fkentrepot;
|
||||
$sql.= " WHERE p.entity IN (".getEntity('product', 1).")";
|
||||
|
||||
// Recuperation des donnees en fonction de la source (liste deroulante ou champ texte) ...
|
||||
@ -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>";
|
||||
|
||||
@ -49,14 +49,14 @@ if (! ($thirdpartyid > 0))
|
||||
}
|
||||
|
||||
// If we setup stock module to ask movement on invoices, we must not allow access if required setup not finished.
|
||||
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_BILL && ! ($warehouseid > 0))
|
||||
if (! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_BILL && ! ($warehouseid > 0))
|
||||
{
|
||||
$retour=$langs->trans("CashDeskSetupStock");
|
||||
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (! empty($_POST['txtUsername']) && $conf->banque->enabled && (empty($conf_fkaccount_cash) || empty($conf_fkaccount_cheque) || empty($conf_fkaccount_cb)))
|
||||
if (! empty($_POST['txtUsername']) && ! empty($conf->banque->enabled) && (empty($conf_fkaccount_cash) || empty($conf_fkaccount_cheque) || empty($conf_fkaccount_cb)))
|
||||
{
|
||||
$langs->load("errors");
|
||||
$retour=$langs->trans("ErrorModuleSetupNotComplete");
|
||||
|
||||
@ -74,7 +74,7 @@ $langs->load("cashdesk");
|
||||
$label = $tab_designations[$i]['label'];
|
||||
|
||||
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'],7).' - '.dol_trunc($label,35,'middle');
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) print ' ('.$langs->trans("CashDeskStock").': '.$tab_designations[$i]['reel'].')';
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) print ' ('.$langs->trans("CashDeskStock").': '.$tab_designations[$i]['reel'].')';
|
||||
print '</option>'."\n ";
|
||||
|
||||
}
|
||||
@ -92,7 +92,7 @@ $langs->load("cashdesk");
|
||||
$label = $tab_designations[$i]['label'];
|
||||
|
||||
print '<option '.$selected.' value="'.$tab_designations[$i]['rowid'].'">'.dol_trunc($tab_designations[$i]['ref'],7).' - '.dol_trunc($label,35,'middle');
|
||||
if ($conf->stock->enabled && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) print ' ('.$langs->trans("CashDeskStock").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
|
||||
if (! empty($conf->stock->enabled) && !empty($conf_fkentrepot) && $tab_designations[$i]['fk_product_type']==0) print ' ('.$langs->trans("CashDeskStock").': '.(empty($tab_designations[$i]['reel'])?0:$tab_designations[$i]['reel']).')';
|
||||
print '</option>'."\n ";
|
||||
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ if (!empty($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE))
|
||||
$bankcheque->fetch($conf->global->CASHDESK_ID_BANKACCOUNT_CHEQUE);
|
||||
$bankchequeLink = $bankcheque->getNomUrl(1);
|
||||
}
|
||||
if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && $conf->stock->enabled)
|
||||
if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
|
||||
{
|
||||
$warehouse=new Entrepot($db);
|
||||
$warehouse->fetch($_SESSION["CASHDESK_ID_WAREHOUSE"]);
|
||||
@ -72,7 +72,7 @@ print $langs->trans("CashDeskThirdParty").': '.$companyLink.'<br>';
|
||||
/*print $langs->trans("CashDeskBankCash").': '.$bankcashLink.'<br>';
|
||||
print $langs->trans("CashDeskBankCB").': '.$bankcbLink.'<br>';
|
||||
print $langs->trans("CashDeskBankCheque").': '.$bankchequeLink.'<br>';*/
|
||||
if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && $conf->stock->enabled)
|
||||
if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled))
|
||||
{
|
||||
print $langs->trans("CashDeskWarehouse").': '.$warehouseLink;
|
||||
}
|
||||
|
||||
@ -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');
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ if ($object->id)
|
||||
print '</td></tr>';
|
||||
|
||||
// Visibility
|
||||
/* if ($type == 0 && $conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
|
||||
/* if ($type == 0 && ! empty($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER))
|
||||
{
|
||||
if ($object->socid)
|
||||
{
|
||||
|
||||
@ -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>';
|
||||
@ -303,7 +303,7 @@ if ($action == 'create')
|
||||
if (! empty($conf->global->PRODUCT_SHOW_WHEN_CREATE))
|
||||
{
|
||||
print '<tr><td colspan="3">';
|
||||
if ($conf->product->enabled || $conf->service->enabled)
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$lib=$langs->trans("ProductsAndServices");
|
||||
|
||||
|
||||
@ -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");
|
||||
@ -410,7 +410,7 @@ if ($id > 0)
|
||||
/*
|
||||
* Last proposals
|
||||
*/
|
||||
if ($conf->propal->enabled && $user->rights->propal->lire)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$propal_static = new Propal($db);
|
||||
|
||||
@ -472,7 +472,7 @@ if ($id > 0)
|
||||
/*
|
||||
* Last orders
|
||||
*/
|
||||
if ($conf->commande->enabled && $user->rights->commande->lire)
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
$commande_static=new Commande($db);
|
||||
|
||||
@ -527,7 +527,7 @@ if ($id > 0)
|
||||
/*
|
||||
* Last linked contracts
|
||||
*/
|
||||
if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
||||
if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
|
||||
{
|
||||
$contratstatic=new Contrat($db);
|
||||
|
||||
@ -587,7 +587,7 @@ if ($id > 0)
|
||||
/*
|
||||
* Last interventions
|
||||
*/
|
||||
if ($conf->ficheinter->enabled && $user->rights->ficheinter->lire)
|
||||
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom, s.rowid, f.rowid as id, f.ref, f.fk_statut, f.duree as duration, f.datei as startdate";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."fichinter as f";
|
||||
@ -642,7 +642,7 @@ if ($id > 0)
|
||||
/*
|
||||
* Last invoices
|
||||
*/
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
$facturestatic = new Facture($db);
|
||||
|
||||
@ -723,13 +723,13 @@ if ($id > 0)
|
||||
*/
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($conf->propal->enabled && $user->rights->propal->creer)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->creer)
|
||||
{
|
||||
$langs->load("propal");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/addpropal.php?socid='.$object->id.'&action=create">'.$langs->trans("AddProp").'</a>';
|
||||
}
|
||||
|
||||
if ($conf->commande->enabled && $user->rights->commande->creer)
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->creer)
|
||||
{
|
||||
$langs->load("orders");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/commande/fiche.php?socid='.$object->id.'&action=create">'.$langs->trans("AddOrder").'</a>';
|
||||
@ -741,7 +741,7 @@ if ($id > 0)
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/contrat/fiche.php?socid='.$object->id.'&action=create">'.$langs->trans("AddContract").'</a>';
|
||||
}
|
||||
|
||||
if ($conf->ficheinter->enabled && $user->rights->ficheinter->creer)
|
||||
if (! empty($conf->ficheinter->enabled) && $user->rights->ficheinter->creer)
|
||||
{
|
||||
$langs->load("fichinter");
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/fichinter/fiche.php?socid='.$object->id.'&action=create">'.$langs->trans("AddIntervention").'</a>';
|
||||
@ -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)
|
||||
{
|
||||
@ -772,7 +772,7 @@ if ($id > 0)
|
||||
}
|
||||
|
||||
// Add action
|
||||
if ($conf->agenda->enabled && ! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
if (! empty($conf->agenda->enabled) && ! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
{
|
||||
if ($user->rights->agenda->myactions->create)
|
||||
{
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -89,15 +89,15 @@ print_fiche_titre($langs->trans("CustomerArea"));
|
||||
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
|
||||
print '<tr>';
|
||||
if (($conf->propal->enabled && $user->rights->propale->lire) ||
|
||||
($conf->contrat->enabled && $user->rights->contrat->lire) ||
|
||||
($conf->commande->enabled && $user->rights->commande->lire))
|
||||
if ((! empty($conf->propal->enabled) && $user->rights->propale->lire) ||
|
||||
(! empty($conf->contrat->enabled) && $user->rights->contrat->lire) ||
|
||||
(! empty($conf->commande->enabled) && $user->rights->commande->lire))
|
||||
{
|
||||
print '<td valign="top" width="30%" class="notopnoleft">';
|
||||
}
|
||||
|
||||
// Recherche Propal
|
||||
if ($conf->propal->enabled && $user->rights->propal->lire)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$var=false;
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/comm/propal/list.php">';
|
||||
@ -116,7 +116,7 @@ if ($conf->propal->enabled && $user->rights->propal->lire)
|
||||
/*
|
||||
* Recherche Contrat
|
||||
*/
|
||||
if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
||||
if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
|
||||
{
|
||||
$var=false;
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/contrat/liste.php">';
|
||||
@ -135,7 +135,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire)
|
||||
/*
|
||||
* Draft proposals
|
||||
*/
|
||||
if ($conf->propal->enabled && $user->rights->propal->lire)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.total_ht, s.rowid as socid, s.nom as name, s.client, s.canvas";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||
@ -200,7 +200,7 @@ if ($conf->propal->enabled && $user->rights->propal->lire)
|
||||
/*
|
||||
* Draft orders
|
||||
*/
|
||||
if ($conf->commande->enabled && $user->rights->commande->lire)
|
||||
if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
$langs->load("orders");
|
||||
|
||||
@ -255,9 +255,9 @@ if ($conf->commande->enabled && $user->rights->commande->lire)
|
||||
}
|
||||
}
|
||||
|
||||
if (($conf->propal->enabled && $user->rights->propale->lire) ||
|
||||
($conf->contrat->enabled && $user->rights->contrat->lire) ||
|
||||
($conf->commande->enabled && $user->rights->commande->lire))
|
||||
if ((! empty($conf->propal->enabled) && $user->rights->propale->lire) ||
|
||||
(! empty($conf->contrat->enabled) && $user->rights->contrat->lire) ||
|
||||
(! empty($conf->commande->enabled) && $user->rights->commande->lire))
|
||||
{
|
||||
print '</td>';
|
||||
print '<td valign="top" width="70%" class="notopnoleftnoright">';
|
||||
@ -276,7 +276,7 @@ $max=3;
|
||||
/*
|
||||
* Last modified customers or prospects
|
||||
*/
|
||||
if ($conf->societe->enabled && $user->rights->societe->lire)
|
||||
if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
|
||||
@ -336,7 +336,7 @@ if ($conf->societe->enabled && $user->rights->societe->lire)
|
||||
}
|
||||
|
||||
// Last suppliers
|
||||
if ($conf->fournisseur->enabled && $user->rights->societe->lire)
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->societe->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
|
||||
@ -408,7 +408,7 @@ if ($user->rights->agenda->myactions->read)
|
||||
/*
|
||||
* Last contracts
|
||||
*/
|
||||
if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
|
||||
if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire && 0) // TODO A REFAIRE DEPUIS NOUVEAU CONTRAT
|
||||
{
|
||||
$langs->load("contracts");
|
||||
|
||||
@ -466,7 +466,7 @@ if ($conf->contrat->enabled && $user->rights->contrat->lire && 0) // TODO A REFA
|
||||
/*
|
||||
* Opened proposals
|
||||
*/
|
||||
if ($conf->propal->enabled && $user->rights->propal->lire)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
{
|
||||
$langs->load("propal");
|
||||
|
||||
@ -516,7 +516,7 @@ if ($conf->propal->enabled && $user->rights->propal->lire)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "</td>";
|
||||
|
||||
@ -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);
|
||||
@ -1640,7 +1640,7 @@ if ($object->statut == 0 && $user->rights->propal->creer)
|
||||
$object->formAddFreeProduct(0,$mysoc,$soc,$hookmanager);
|
||||
|
||||
// Add predefined products/services
|
||||
if ($conf->product->enabled || $conf->service->enabled)
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
$object->formAddPredefinedProduct(0,$mysoc,$soc,$hookmanager);
|
||||
@ -1738,7 +1738,7 @@ if ($action != 'presend')
|
||||
// Create an invoice and classify billed
|
||||
if ($object->statut == 2 && $user->societe_id == 0)
|
||||
{
|
||||
if ($conf->facture->enabled && $user->rights->facture->creer)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("AddBill").'</a>';
|
||||
}
|
||||
|
||||
@ -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";
|
||||
@ -257,7 +257,7 @@ if ($resql)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
@ -334,7 +334,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->propalid;
|
||||
$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "</td>";
|
||||
@ -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";
|
||||
@ -418,7 +418,7 @@ if ($conf->propal->enabled)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
@ -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";
|
||||
@ -490,7 +490,7 @@ if ($conf->propal->enabled)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($propalstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -320,8 +320,7 @@ if ($result)
|
||||
$filename=dol_sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->propalid;
|
||||
//$formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink('propal', $filename, $filedir);
|
||||
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
if ($objp->client == 1)
|
||||
|
||||
@ -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");
|
||||
@ -225,7 +225,7 @@ if ($socid > 0)
|
||||
/*
|
||||
* Last proposals
|
||||
*/
|
||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
{
|
||||
$propal_static=new Propal($db);
|
||||
|
||||
@ -297,13 +297,13 @@ if ($socid > 0)
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
|
||||
if ($conf->propal->enabled && $user->rights->propale->creer)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propale->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/comm/addpropal.php?socid='.$object->id.'&action=create">'.$langs->trans("AddProp").'</a>';
|
||||
}
|
||||
|
||||
// Add action
|
||||
if ($conf->agenda->enabled && ! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
if (! empty($conf->agenda->enabled) && ! empty($conf->global->MAIN_REPEATTASKONEACHTAB))
|
||||
{
|
||||
if ($user->rights->agenda->myactions->create)
|
||||
{
|
||||
|
||||
@ -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%">';
|
||||
@ -111,7 +111,7 @@ if ($resql)
|
||||
/*
|
||||
* Liste des propal brouillons
|
||||
*/
|
||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
{
|
||||
$sql = "SELECT p.rowid, p.ref, p.price, s.nom as sname";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as p";
|
||||
@ -164,13 +164,13 @@ 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
|
||||
*
|
||||
*/
|
||||
if ($conf->propal->enabled && $user->rights->propale->lire)
|
||||
if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
{
|
||||
$sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas,";
|
||||
$sql.= " p.rowid as propalid, p.total as total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid";
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -237,7 +237,7 @@ class Commande extends CommonOrder
|
||||
if (! $error)
|
||||
{
|
||||
// If stock is incremented on validate order, we must increment it
|
||||
if ($result >= 0 && $conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
if ($result >= 0 && ! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
$langs->load("agenda");
|
||||
@ -351,7 +351,7 @@ class Commande extends CommonOrder
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// If stock is decremented on validate order, we must reincrement it
|
||||
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
if (! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
$langs->load("agenda");
|
||||
@ -534,7 +534,7 @@ class Commande extends CommonOrder
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// If stock is decremented on validate order, we must reincrement it
|
||||
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
if (! empty($conf->stock->enabled) && $conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER == 1)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
$langs->load("agenda");
|
||||
@ -2538,7 +2538,7 @@ class Commande extends CommonOrder
|
||||
|
||||
$result='';
|
||||
|
||||
if ($conf->expedition->enabled && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
|
||||
if (! empty($conf->expedition->enabled) && ($option == 1 || $option == 2)) $url = DOL_URL_ROOT.'/expedition/shipment.php?id='.$this->id;
|
||||
else $url = DOL_URL_ROOT.'/commande/fiche.php?id='.$this->id;
|
||||
|
||||
if ($short) return $url;
|
||||
@ -3140,7 +3140,7 @@ class OrderLine
|
||||
$sql.= " , total_ht=".price2num($this->total_ht)."";
|
||||
$sql.= " , total_tva=".price2num($this->total_tva)."";
|
||||
$sql.= " , total_ttc=".price2num($this->total_ttc)."";
|
||||
$sql.= " , total_localtax1=".price2num($this->total_localtax1);
|
||||
$sql.= " , total_localtax1=".price2num($this->total_localtax1);
|
||||
$sql.= " , total_localtax2=".price2num($this->total_localtax2);
|
||||
}
|
||||
$sql.= " , fk_product_fournisseur_price=".(! empty($this->fk_fournprice)?$this->fk_fournprice:"null");
|
||||
|
||||
@ -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')
|
||||
@ -2153,7 +2153,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
$object->formAddFreeProduct(1,$mysoc,$soc,$hookmanager);
|
||||
|
||||
// Add predefined products/services
|
||||
if ($conf->product->enabled || $conf->service->enabled)
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
$object->formAddPredefinedProduct(1,$mysoc,$soc,$hookmanager);
|
||||
@ -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();
|
||||
|
||||
@ -2235,7 +2235,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
|
||||
|
||||
|
||||
// Create bill and Classify billed
|
||||
if ($conf->facture->enabled && $object->statut > 0 && ! $object->billed)
|
||||
if (! empty($conf->facture->enabled) && $object->statut > 0 && ! $object->billed)
|
||||
{
|
||||
if ($user->rights->facture->creer && empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER))
|
||||
{
|
||||
|
||||
@ -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";
|
||||
@ -262,7 +262,7 @@ if ($resql)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
@ -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";
|
||||
@ -331,7 +331,7 @@ if ($conf->commande->enabled)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
@ -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";
|
||||
@ -402,7 +402,7 @@ if ($conf->commande->enabled)
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -308,7 +308,7 @@ if ($resql)
|
||||
$filename=dol_sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
|
||||
@ -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">';
|
||||
@ -469,10 +469,10 @@ if ($action == 'create')
|
||||
while ($i < $n)
|
||||
{
|
||||
print '<input type="hidden" name="orders_to_invoice[]" value="'.$orders_id[$i].'">';
|
||||
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
|
||||
print "</table>\n";
|
||||
// Button "Create Draft"
|
||||
print '<br><center><input type="submit" class="button" name="bouton" value="'.$langs->trans('CreateDraft').'"></center>';
|
||||
@ -496,7 +496,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
|
||||
|
||||
$sql = 'SELECT s.nom, s.rowid as socid, s.client, c.rowid, c.ref, c.total_ht, c.ref_client,';
|
||||
$sql.= ' c.date_valid, c.date_commande, c.date_livraison, c.fk_statut, c.facture as facturee';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s';
|
||||
@ -535,18 +535,18 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
||||
{
|
||||
$sql.= " AND (c.ref LIKE '%".$db->escape($sall)."%' OR c.note LIKE '%".$db->escape($sall)."%')";
|
||||
}
|
||||
|
||||
|
||||
//Date filter
|
||||
if ($date_start && $date_end) $sql.= " AND c.date_commande >= '".$db->idate($date_start)."' AND c.date_commande <= '".$db->idate($date_end)."'";
|
||||
if ($date_starty && $date_endy) $sql.= " AND c.date_livraison >= '".$db->idate($date_starty)."' AND c.date_livraison <= '".$db->idate($date_endy)."'";
|
||||
|
||||
|
||||
if (!empty($sref_client))
|
||||
{
|
||||
$sql.= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\'';
|
||||
}
|
||||
$sql.= ' ORDER BY '.$sortfield.' '.$sortorder;
|
||||
$resql = $db->query($sql);
|
||||
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
if ($socid)
|
||||
@ -569,7 +569,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
||||
print '<h3>';
|
||||
$companystatic->id=$socid;
|
||||
$companystatic->nom=$soc->nom;
|
||||
|
||||
|
||||
print $companystatic->getNomUrl(1,'customer');
|
||||
print '</h3>';
|
||||
print '<table class="noborder" width="100%">';
|
||||
@ -581,7 +581,7 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
||||
print_liste_field_titre($langs->trans('Status'),'','','','','align="right"');
|
||||
print_liste_field_titre($langs->trans('GenerateBill'),'','','','','align="center"');
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form method="get" action="orderstoinvoice.php">';
|
||||
print '<input type="hidden" name="socid" value="'.$socid.'">';
|
||||
@ -593,88 +593,88 @@ if (($action != 'create' && $action != 'add') || ! empty($mesgs))
|
||||
//print '<td class="liste_titre">';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="10" name="sref_client" value="'.$sref_client.'">';
|
||||
|
||||
|
||||
//DATE ORDER
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $period;
|
||||
print '</td>';
|
||||
|
||||
|
||||
//DATE DELIVERY
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $periodely;
|
||||
print '</td>';
|
||||
|
||||
|
||||
//SEARCH BUTTON
|
||||
print '</td><td align="right" class="liste_titre">';
|
||||
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")).'">';
|
||||
|
||||
|
||||
//ALL/NONE
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if ($conf->use_javascript_ajax) print '<a href="#" id="checkall">'.$langs->trans("All").'</a> / <a href="#" id="checknone">'.$langs->trans("None").'</a>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '</td></tr>';
|
||||
print '</form>';
|
||||
|
||||
|
||||
print '<form name="orders2invoice" action="orderstoinvoice.php" method="GET">';
|
||||
$var=True;
|
||||
$generic_commande = new Commande($db);
|
||||
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td nowrap="nowrap">';
|
||||
|
||||
|
||||
$generic_commande->id=$objp->rowid;
|
||||
$generic_commande->ref=$objp->ref;
|
||||
|
||||
|
||||
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
|
||||
print '<td class="nobordernopadding" nowrap="nowrap">';
|
||||
print $generic_commande->getNomUrl(1,$objp->fk_statut);
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
|
||||
if (($objp->fk_statut > 0) && ($objp->fk_statut < 3) && $db->jdate($objp->date_valid) < ($now - $conf->commande->client->warning_delay)) print img_picto($langs->trans("Late"),"warning");
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td>'.$objp->ref_client.'</td>';
|
||||
|
||||
|
||||
// Order date
|
||||
print '<td align="center" nowrap>';
|
||||
print dol_print_date($db->jdate($objp->date_commande),'day');
|
||||
print '</td>';
|
||||
|
||||
|
||||
//Delivery date
|
||||
print '<td align="center" nowrap>';
|
||||
print dol_print_date($db->jdate($objp->date_livraison),'day');
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Statut
|
||||
print '<td align="right" nowrap="nowrap">'.$generic_commande->LibStatut($objp->fk_statut,$objp->facturee,5).'</td>';
|
||||
|
||||
|
||||
// Checkbox
|
||||
print '<td align="center">';
|
||||
print '<input class="flat checkformerge" type="checkbox" name="orders_to_invoice[]" value="'.$objp->rowid.'">';
|
||||
print '</td>' ;
|
||||
|
||||
|
||||
print '</tr>';
|
||||
|
||||
|
||||
$total = $total + $objp->price;
|
||||
$subtotal = $subtotal + $objp->price;
|
||||
$i++;
|
||||
}
|
||||
print '</table>';
|
||||
|
||||
|
||||
/*
|
||||
* Boutons actions
|
||||
*/
|
||||
|
||||
@ -429,11 +429,11 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= ", s.rowid as socid, s.nom as thirdparty";
|
||||
}
|
||||
/*
|
||||
if ($mode_search && $conf->adherent->enabled)
|
||||
if ($mode_search && ! empty($conf->adherent->enabled))
|
||||
{
|
||||
|
||||
}
|
||||
if ($mode_search && $conf->tax->enabled)
|
||||
if ($mode_search && ! empty($conf->tax->enabled))
|
||||
{
|
||||
|
||||
}
|
||||
@ -445,12 +445,12 @@ if ($id > 0 || ! empty($ref))
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu1.url_id = s.rowid";
|
||||
}
|
||||
if ($mode_search && $conf->tax->enabled)
|
||||
if ($mode_search && ! empty($conf->tax->enabled))
|
||||
{
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu2 ON bu2.fk_bank = b.rowid AND bu2.type='payment_vat'";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."tva as t ON bu2.url_id = t.rowid";
|
||||
}
|
||||
if ($mode_search && $conf->adherent->enabled)
|
||||
if ($mode_search && ! empty($conf->adherent->enabled))
|
||||
{
|
||||
// TODO Mettre jointure sur adherent pour recherche sur un adherent
|
||||
//$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu3 ON bu3.fk_bank = b.rowid AND bu3.type='company'";
|
||||
|
||||
@ -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;
|
||||
@ -3016,7 +3016,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$object->formAddFreeProduct(1,$mysoc,$soc,$hookmanager);
|
||||
|
||||
// Add predefined products/services
|
||||
if ($conf->product->enabled || $conf->service->enabled)
|
||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled))
|
||||
{
|
||||
$var=!$var;
|
||||
$object->formAddPredefinedProduct(1,$mysoc,$soc,$hookmanager);
|
||||
@ -3268,7 +3268,7 @@ else if ($id > 0 || ! empty($ref))
|
||||
$somethingshown=$object->showLinkedObjectBlock();
|
||||
|
||||
// Link for paypal payment
|
||||
if ($conf->paypal->enabled && $object->statut != 0)
|
||||
if (! empty($conf->paypal->enabled) && $object->statut != 0)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
|
||||
print showPaypalPaymentUrl('invoice',$object->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>';
|
||||
|
||||
@ -1809,7 +1809,7 @@ class Facture extends CommonInvoice
|
||||
if ($result)
|
||||
{
|
||||
// Si on decremente le produit principal et ses composants a la validation de facture, on réincrement
|
||||
if ($this->type != 3 && $result >= 0 && $conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_BILL)
|
||||
if ($this->type != 3 && $result >= 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL))
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php';
|
||||
$langs->load("agenda");
|
||||
@ -3446,7 +3446,7 @@ class FactureLigne
|
||||
$sql.= ",total_ht=".price2num($this->total_ht)."";
|
||||
$sql.= ",total_tva=".price2num($this->total_tva)."";
|
||||
$sql.= ",total_ttc=".price2num($this->total_ttc)."";
|
||||
$sql.= ",total_localtax1=".price2num($this->total_localtax1)."";
|
||||
$sql.= ",total_localtax1=".price2num($this->total_localtax1)."";
|
||||
$sql.= ",total_localtax2=".price2num($this->total_localtax2)."";
|
||||
}
|
||||
$sql.= " , fk_product_fournisseur_price='".$this->fk_fournprice."'";
|
||||
|
||||
@ -301,10 +301,10 @@ if ($action == 'create')
|
||||
$prodprice=$product_static->price; // price HT
|
||||
print '<td align="right">'.price($prodprice)."</td>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
@ -340,7 +340,7 @@ if ($resql)
|
||||
print '<td width="16" align="right" class="nobordernopadding">';
|
||||
$filename=dol_sanitizeFileName($objp->facnumber);
|
||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
|
||||
$foundpdf=$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1,$param);
|
||||
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||
print '</td>';
|
||||
|
||||
print '</tr></table>';
|
||||
@ -365,8 +365,10 @@ if ($resql)
|
||||
|
||||
// Checkbox
|
||||
print '<td align="center">';
|
||||
if ($foundpdf) print '<input id="cb'.$objp->facid.'" class="flat checkformerge" type="checkbox" name="toGenerate[]" value="'.$objp->facnumber.'">';
|
||||
else print ' ';
|
||||
if (! empty($formfile->numoffiles))
|
||||
print '<input id="cb'.$objp->facid.'" class="flat checkformerge" type="checkbox" name="toGenerate[]" value="'.$objp->facnumber.'">';
|
||||
else
|
||||
print ' ';
|
||||
print '</td>' ;
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -341,7 +341,7 @@ if ($resql)
|
||||
$filename=dol_sanitizeFileName($objp->facnumber);
|
||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($objp->facnumber);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->facid;
|
||||
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
@ -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='';
|
||||
@ -108,7 +108,7 @@ $max=3;
|
||||
/*
|
||||
* Search invoices
|
||||
*/
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/compta/facture/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -125,7 +125,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
/*
|
||||
* Search supplier invoices
|
||||
*/
|
||||
if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire)
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire)
|
||||
{
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/fourn/facture/index.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -142,7 +142,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->lire)
|
||||
/*
|
||||
* Search donations
|
||||
*/
|
||||
if ($conf->don->enabled && $user->rights->don->lire)
|
||||
if (! empty($conf->don->enabled) && $user->rights->don->lire)
|
||||
{
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/compta/dons/liste.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -159,7 +159,7 @@ if ($conf->don->enabled && $user->rights->don->lire)
|
||||
/*
|
||||
* Search expenses
|
||||
*/
|
||||
if ($conf->deplacement->enabled && $user->rights->deplacement->lire)
|
||||
if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
|
||||
{
|
||||
print '<form method="post" action="'.DOL_URL_ROOT.'/compta/deplacement/list.php">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
@ -176,7 +176,7 @@ if ($conf->deplacement->enabled && $user->rights->deplacement->lire)
|
||||
/**
|
||||
* Draft customers invoices
|
||||
*/
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.type,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
@ -250,7 +250,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
/**
|
||||
* Draft suppliers invoices
|
||||
*/
|
||||
if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$sql = "SELECT f.facnumber, f.rowid, f.total_ttc, f.type,";
|
||||
$sql.= " s.nom, s.rowid as socid";
|
||||
@ -320,7 +320,7 @@ print '</td>';
|
||||
print '<td valign="top" width="70%" class="notopnoleftnoright">';
|
||||
|
||||
// Last modified customer invoices
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
$facstatic=new Facture($db);
|
||||
@ -349,7 +349,7 @@ if ($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>';
|
||||
@ -378,7 +378,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
$filename=dol_sanitizeFileName($obj->facnumber);
|
||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
||||
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
@ -388,7 +388,7 @@ if ($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 ($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>';
|
||||
@ -419,7 +419,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
|
||||
|
||||
// Last modified supplier invoices
|
||||
if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$langs->load("boxes");
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
@ -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>';
|
||||
@ -498,7 +498,7 @@ if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
|
||||
|
||||
// Last donations
|
||||
if ($conf->don->enabled && $user->rights->societe->lire)
|
||||
if (! empty($conf->don->enabled) && $user->rights->societe->lire)
|
||||
{
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/dons/class/don.class.php';
|
||||
|
||||
@ -633,7 +633,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
|
||||
/**
|
||||
* Social contributions to pay
|
||||
*/
|
||||
if ($conf->tax->enabled && $user->rights->tax->charges->lire)
|
||||
if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
|
||||
{
|
||||
if (!$socid)
|
||||
{
|
||||
@ -709,7 +709,7 @@ if ($conf->tax->enabled && $user->rights->tax->charges->lire)
|
||||
/*
|
||||
* Customers orders to be billed
|
||||
*/
|
||||
if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->commande->lire)
|
||||
if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
{
|
||||
$commandestatic=new Commande($db);
|
||||
$langs->load("orders");
|
||||
@ -742,7 +742,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman
|
||||
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>';
|
||||
@ -770,7 +770,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman
|
||||
$filename=dol_sanitizeFileName($obj->ref);
|
||||
$filedir=$conf->commande->dir_output . '/' . dol_sanitizeFileName($obj->ref);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid;
|
||||
$formfile->show_documents('commande',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($commandestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
@ -781,7 +781,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman
|
||||
$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 ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman
|
||||
}
|
||||
|
||||
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>';
|
||||
@ -813,7 +813,7 @@ if ($conf->facture->enabled && $conf->commande->enabled && $user->rights->comman
|
||||
/*
|
||||
* Unpaid customers invoices
|
||||
*/
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
$facstatic=new Facture($db);
|
||||
|
||||
@ -840,7 +840,7 @@ if ($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>';
|
||||
@ -853,7 +853,6 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td nowrap="nowrap">';
|
||||
|
||||
@ -871,7 +870,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
$filename=dol_sanitizeFileName($obj->facnumber);
|
||||
$filedir=$conf->facture->dir_output . '/' . dol_sanitizeFileName($obj->facnumber);
|
||||
$urlsource=$_SERVER['PHP_SELF'].'?facid='.$obj->rowid;
|
||||
$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','',1,'',1);
|
||||
print $formfile->getDocumentsLink($facturestatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print '</td>';
|
||||
@ -881,7 +880,7 @@ if ($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>';
|
||||
@ -895,7 +894,7 @@ if ($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>';
|
||||
@ -904,7 +903,7 @@ if ($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>';
|
||||
@ -919,7 +918,7 @@ if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
/*
|
||||
* Unpayed supplier invoices
|
||||
*/
|
||||
if ($conf->fournisseur->enabled && $user->rights->fournisseur->facture->lire)
|
||||
if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture->lire)
|
||||
{
|
||||
$facstatic=new FactureFournisseur($db);
|
||||
|
||||
@ -945,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>';
|
||||
@ -968,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>';
|
||||
@ -981,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>';
|
||||
@ -990,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>';
|
||||
|
||||
@ -464,12 +464,12 @@ class Localtax extends CommonObject
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
|
||||
return -4;
|
||||
}
|
||||
if ($conf->banque->enabled && (empty($this->accountid) || $this->accountid <= 0))
|
||||
if (! empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Account"));
|
||||
return -5;
|
||||
}
|
||||
if ($conf->banque->enabled && (empty($this->paymenttype) || $this->paymenttype <= 0))
|
||||
if (! empty($conf->banque->enabled) && (empty($this->paymenttype) || $this->paymenttype <= 0))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode"));
|
||||
return -5;
|
||||
@ -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
|
||||
@ -245,7 +245,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
|
||||
|
||||
// Invoice with Paypal transaction
|
||||
// TODO add hook possibility (regis)
|
||||
if ($conf->paypalplus->enabled && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && ! empty($facture->ref_int))
|
||||
if (! empty($conf->paypalplus->enabled) && $conf->global->PAYPAL_ENABLE_TRANSACTION_MANAGEMENT && ! empty($facture->ref_int))
|
||||
{
|
||||
if (! empty($conf->global->PAYPAL_BANK_ACCOUNT)) $accountid=$conf->global->PAYPAL_BANK_ACCOUNT;
|
||||
$paymentnum=$facture->ref_int;
|
||||
@ -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">';
|
||||
|
||||
@ -66,7 +66,7 @@ if ($_POST["action"] == 'add_payment')
|
||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("Date"));
|
||||
$error++;
|
||||
}
|
||||
if ($conf->banque->enabled && ! $_POST["accountid"] > 0)
|
||||
if (! empty($conf->banque->enabled) && ! $_POST["accountid"] > 0)
|
||||
{
|
||||
$mesg = $langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountToCredit"));
|
||||
$error++;
|
||||
|
||||
@ -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"];
|
||||
@ -79,7 +79,7 @@ if ($socid > 0)
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($conf->facture->enabled && $user->rights->facture->lire)
|
||||
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
{
|
||||
// Factures
|
||||
print_fiche_titre($langs->trans("CustomerPreview"));
|
||||
|
||||
@ -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';
|
||||
|
||||
|
||||
@ -282,9 +282,9 @@ if (count($amount))
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
if ($conf->propal->enabled && $key>0) print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
if ($conf->commande->enabled && $key>0) print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
if ($conf->facture->enabled && $key>0) print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
if (! empty($conf->propal->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
if (! empty($conf->commande->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
if (! empty($conf->facture->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?userid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -292,9 +292,9 @@ if (count($amount))
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
if ($conf->propal->enabled && $key>0) print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
if ($conf->commande->enabled && $key>0) print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
if ($conf->facture->enabled && $key>0) print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
if (! empty($conf->propal->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/comm/propal/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("ProposalStats"),"stats").'</a> ';
|
||||
if (! empty($conf->commande->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/commande/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("OrderStats"),"stats").'</a> ';
|
||||
if (! empty($conf->facture->enabled) && $key>0) print ' <a href="'.DOL_URL_ROOT.'/compta/facture/stats/index.php?socid='.$key.'">'.img_picto($langs->trans("InvoiceStats"),"stats").'</a> ';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
@ -485,12 +485,12 @@ class Tva extends CommonObject
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount"));
|
||||
return -4;
|
||||
}
|
||||
if ($conf->banque->enabled && (empty($this->accountid) || $this->accountid <= 0))
|
||||
if (! empty($conf->banque->enabled) && (empty($this->accountid) || $this->accountid <= 0))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Account"));
|
||||
return -5;
|
||||
}
|
||||
if ($conf->banque->enabled && (empty($this->paymenttype) || $this->paymenttype <= 0))
|
||||
if (! empty($conf->banque->enabled) && (empty($this->paymenttype) || $this->paymenttype <= 0))
|
||||
{
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("PaymentMode"));
|
||||
return -5;
|
||||
@ -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");
|
||||
|
||||
@ -331,9 +331,9 @@ class Contact extends CommonObject
|
||||
$this->fullname=$this->getFullName($langs);
|
||||
|
||||
// Fields
|
||||
if ($this->fullname && $conf->global->LDAP_CONTACT_FIELD_FULLNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->lastname && $conf->global->LDAP_CONTACT_FIELD_NAME) $info[$conf->global->LDAP_CONTACT_FIELD_NAME] = $this->lastname;
|
||||
if ($this->firstname && $conf->global->LDAP_CONTACT_FIELD_FIRSTNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname;
|
||||
if ($this->fullname && ! empty($conf->global->LDAP_CONTACT_FIELD_FULLNAME)) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->fullname;
|
||||
if ($this->lastname && ! empty($conf->global->LDAP_CONTACT_FIELD_NAME)) $info[$conf->global->LDAP_CONTACT_FIELD_NAME] = $this->lastname;
|
||||
if ($this->firstname && ! empty($conf->global->LDAP_CONTACT_FIELD_FIRSTNAME)) $info[$conf->global->LDAP_CONTACT_FIELD_FIRSTNAME] = $this->firstname;
|
||||
|
||||
if ($this->poste) $info["title"] = $this->poste;
|
||||
if ($this->socid > 0)
|
||||
@ -346,16 +346,16 @@ class Contact extends CommonObject
|
||||
if ($soc->client == 2) $info["businessCategory"] = "Prospects";
|
||||
if ($soc->fournisseur == 1) $info["businessCategory"] = "Suppliers";
|
||||
}
|
||||
if ($this->address && $conf->global->LDAP_CONTACT_FIELD_ADDRESS) $info[$conf->global->LDAP_CONTACT_FIELD_ADDRESS] = $this->address;
|
||||
if ($this->cp && $conf->global->LDAP_CONTACT_FIELD_ZIP) $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->cp;
|
||||
if ($this->ville && $conf->global->LDAP_CONTACT_FIELD_TOWN) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->ville;
|
||||
if ($this->country_code && $conf->global->LDAP_CONTACT_FIELD_COUNTRY) $info[$conf->global->LDAP_CONTACT_FIELD_COUNTRY] = $this->country_code;
|
||||
if ($this->phone_pro && $conf->global->LDAP_CONTACT_FIELD_PHONE) $info[$conf->global->LDAP_CONTACT_FIELD_PHONE] = $this->phone_pro;
|
||||
if ($this->phone_perso && $conf->global->LDAP_CONTACT_FIELD_HOMEPHONE) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso;
|
||||
if ($this->phone_mobile && $conf->global->LDAP_CONTACT_FIELD_MOBILE) $info[$conf->global->LDAP_CONTACT_FIELD_MOBILE] = $this->phone_mobile;
|
||||
if ($this->fax && $conf->global->LDAP_CONTACT_FIELD_FAX) $info[$conf->global->LDAP_CONTACT_FIELD_FAX] = $this->fax;
|
||||
if ($this->note && $conf->global->LDAP_CONTACT_FIELD_DESCRIPTION) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = $this->note;
|
||||
if ($this->email && $conf->global->LDAP_CONTACT_FIELD_MAIL) $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email;
|
||||
if ($this->address && ! empty($conf->global->LDAP_CONTACT_FIELD_ADDRESS)) $info[$conf->global->LDAP_CONTACT_FIELD_ADDRESS] = $this->address;
|
||||
if ($this->cp && ! empty($conf->global->LDAP_CONTACT_FIELD_ZIP)) $info[$conf->global->LDAP_CONTACT_FIELD_ZIP] = $this->cp;
|
||||
if ($this->ville && ! empty($conf->global->LDAP_CONTACT_FIELD_TOWN)) $info[$conf->global->LDAP_CONTACT_FIELD_TOWN] = $this->ville;
|
||||
if ($this->country_code && ! empty($conf->global->LDAP_CONTACT_FIELD_COUNTRY)) $info[$conf->global->LDAP_CONTACT_FIELD_COUNTRY] = $this->country_code;
|
||||
if ($this->phone_pro && ! empty($conf->global->LDAP_CONTACT_FIELD_PHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_PHONE] = $this->phone_pro;
|
||||
if ($this->phone_perso && ! empty($conf->global->LDAP_CONTACT_FIELD_HOMEPHONE)) $info[$conf->global->LDAP_CONTACT_FIELD_HOMEPHONE] = $this->phone_perso;
|
||||
if ($this->phone_mobile && ! empty($conf->global->LDAP_CONTACT_FIELD_MOBILE)) $info[$conf->global->LDAP_CONTACT_FIELD_MOBILE] = $this->phone_mobile;
|
||||
if ($this->fax && ! empty($conf->global->LDAP_CONTACT_FIELD_FAX)) $info[$conf->global->LDAP_CONTACT_FIELD_FAX] = $this->fax;
|
||||
if ($this->note && ! empty($conf->global->LDAP_CONTACT_FIELD_DESCRIPTION)) $info[$conf->global->LDAP_CONTACT_FIELD_DESCRIPTION] = $this->note;
|
||||
if ($this->email && ! empty($conf->global->LDAP_CONTACT_FIELD_MAIL)) $info[$conf->global->LDAP_CONTACT_FIELD_MAIL] = $this->email;
|
||||
|
||||
if ($conf->global->LDAP_SERVER_TYPE == 'egroupware')
|
||||
{
|
||||
|
||||
@ -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);
|
||||
@ -1359,7 +1359,7 @@ else
|
||||
else print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("Validate").'</a>';
|
||||
}
|
||||
|
||||
if ($conf->facture->enabled && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices)
|
||||
if (! empty($conf->facture->enabled) && $object->statut > 0 && $object->nbofservicesclosed < $nbofservices)
|
||||
{
|
||||
$langs->load("bills");
|
||||
if ($user->rights->facture->creer) print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->thirdparty->id.'">'.$langs->trans("CreateBill").'</a>';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user