diff --git a/htdocs/cashdesk/affIndex.php b/htdocs/cashdesk/affIndex.php index 576e85e631a..2530a842df7 100644 --- a/htdocs/cashdesk/affIndex.php +++ b/htdocs/cashdesk/affIndex.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2008 Jeremie Ollivier * Copyright (C) 2008-2010 Laurent Destailleur * Copyright (C) 2009 Regis Houssin + * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,11 +29,13 @@ require('../main.inc.php'); require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php'); // Test if already logged -if ( $_SESSION['uid'] <= 0 ) { +if ( $_SESSION['uid'] <= 0 ) +{ header ('Location: index.php'); exit; } +$langs->load("cashdesk"); /* * View diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index d6a90ecf1c3..f9cf9a09b9b 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -1,6 +1,7 @@ * Copyright (C) 2008-2009 Laurent Destailleur + * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +37,7 @@ if ( $_GET['filtre'] ) { 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."'"; $sql.= " WHERE p.tosell = 1"; $sql.= " AND p.fk_product_type = 0"; - $sql.= " AND (p.ref LIKE '%".$_GET['filtre']."%' OR p.label LIKE '%".$_GET['filtre']."%')"; + $sql.= " AND (p.ref LIKE '%".$_GET['filtre']."%' OR p.label LIKE '%".$_GET['filtre']."%' OR p.barcode='".$_GET['filtre']."')"; $sql.= " ORDER BY label"; dol_syslog("facturation.php sql=".$sql); @@ -97,11 +98,11 @@ if ( $nbr_enreg > 1 ) { if ( $nbr_enreg > $conf_taille_listes ) { - $top_liste_produits = '----- '.$conf_taille_listes.' '.$langs->transnoentitiesnoconv("Products").' '.$langs->trans("on").' '.$nbr_enreg.' -----'; + $top_liste_produits = '----- '.$conf_taille_listes.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----'; } else { - $top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("Products").' '.$langs->trans("on").' '.$nbr_enreg.' -----'; + $top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----'; } diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 746334f6e5b..d41b63ba3a4 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -1,5 +1,6 @@ + * Copyright (C) 2011 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -65,7 +66,7 @@ top_htmlhead('','',0,0,'',$arrayofcss);