Skip to content

Commit

Permalink
Fix: strict mode tornado
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Sep 15, 2012
1 parent e19f8c5 commit 43c0a03
Show file tree
Hide file tree
Showing 86 changed files with 300 additions and 300 deletions.
12 changes: 6 additions & 6 deletions htdocs/adherents/card_subscriptions.php
Expand Up @@ -246,7 +246,7 @@
}
else
{
if ($conf->banque->enabled && $_POST["paymentsave"] != 'none')
if (! empty($conf->banque->enabled) && $_POST["paymentsave"] != 'none')
{
if ($_POST["cotisation"])
{
Expand Down Expand Up @@ -740,8 +740,8 @@
$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";

Expand Down Expand Up @@ -873,7 +873,7 @@
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)
Expand All @@ -894,7 +894,7 @@
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"';
Expand All @@ -909,7 +909,7 @@
}
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"';
Expand Down
50 changes: 25 additions & 25 deletions htdocs/adherents/class/adherent.class.php
Expand Up @@ -1382,7 +1382,7 @@ function add_to_abo()
}

// 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)
Expand Down Expand Up @@ -1427,7 +1427,7 @@ function del_to_abo()
}
}

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)
Expand Down Expand Up @@ -1787,31 +1787,31 @@ function _load_ldap_info()
$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;
}
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/cotisations.php
Expand Up @@ -131,7 +131,7 @@

$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'].'">';
Expand Down Expand Up @@ -193,7 +193,7 @@
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";
}
Expand Down
4 changes: 2 additions & 2 deletions htdocs/adherents/fiche.php
Expand Up @@ -1532,7 +1532,7 @@
}

// Create third party
if ($conf->societe->enabled && ! $object->fk_soc)
if (! empty($conf->societe->enabled) && ! $object->fk_soc)
{
if ($user->rights->societe->creer)
{
Expand Down Expand Up @@ -1570,7 +1570,7 @@
}

// 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);

Expand Down
2 changes: 1 addition & 1 deletion htdocs/adherents/fiche_subscription.php
Expand Up @@ -290,7 +290,7 @@
//$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>';
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/fckeditor.php
Expand Up @@ -69,7 +69,7 @@
{
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);
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/admin/ldap.php
Expand Up @@ -269,7 +269,7 @@
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)
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/asterisk/wrapper.php
Expand Up @@ -66,7 +66,7 @@ function llxFooter()


// Security check
if (! $conf->clicktodial->enabled)
if (empty($conf->clicktodial->enabled))
{
accessforbidden();
exit;
Expand Down
8 changes: 4 additions & 4 deletions htdocs/cashdesk/facturation.php
Expand Up @@ -30,9 +30,9 @@
$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";
Expand Down Expand Up @@ -67,9 +67,9 @@
$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";
Expand Down
4 changes: 2 additions & 2 deletions htdocs/cashdesk/facturation_dhtml.php
Expand Up @@ -44,9 +44,9 @@
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";
Expand Down
4 changes: 2 additions & 2 deletions htdocs/cashdesk/facturation_verif.php
Expand Up @@ -32,9 +32,9 @@
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) ...
Expand Down
4 changes: 2 additions & 2 deletions htdocs/cashdesk/index_verif.php
Expand Up @@ -49,14 +49,14 @@
}

// 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");
Expand Down
4 changes: 2 additions & 2 deletions htdocs/cashdesk/tpl/facturation1.tpl.php
Expand Up @@ -74,7 +74,7 @@
$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 ";

}
Expand All @@ -92,7 +92,7 @@
$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 ";

}
Expand Down

0 comments on commit 43c0a03

Please sign in to comment.