diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php
index 86e20267274..dc5c99daa22 100644
--- a/htdocs/cashdesk/affContenu.php
+++ b/htdocs/cashdesk/affContenu.php
@@ -44,7 +44,12 @@ else
}
print '
';
-include('liste_articles.php');
+
+require ('tpl/liste_articles.tpl.php');
+
+$obj_facturation->prix_total_ht($lst_total_ht);
+$obj_facturation->prix_total_ttc($lst_total_ttc);
+
print '
';
print '';
@@ -55,11 +60,11 @@ if ( $_GET['menu'] )
}
else
{
- include ('facturation.php');
+ include('facturation.php');
}
print '
';
-$_SESSION['serObjFacturation'] = serialize ($obj_facturation);
+$_SESSION['serObjFacturation'] = serialize($obj_facturation);
?>
\ No newline at end of file
diff --git a/htdocs/cashdesk/affIndex.php b/htdocs/cashdesk/affIndex.php
index d6ec051ceb3..37f20100848 100644
--- a/htdocs/cashdesk/affIndex.php
+++ b/htdocs/cashdesk/affIndex.php
@@ -29,7 +29,7 @@ require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php');
// Test if already logged
if ( $_SESSION['uid'] <= 0 )
{
- header ('Location: index.php');
+ header('Location: index.php');
exit;
}
diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php
index 1ab7481582f..ffa4dbf1950 100644
--- a/htdocs/cashdesk/class/Auth.class.php
+++ b/htdocs/cashdesk/class/Auth.class.php
@@ -34,51 +34,46 @@ class Auth
/**
* Enter description here ...
*
- * @param unknown_type $DB
+ * @param DoliDB $DB Database handler
+ * @return void
*/
function Auth($DB)
{
-
$this->db = $DB;
$this->reponse(null);
-
}
/**
* Enter description here ...
*
- * @param unknown_type $aLogin
+ * @param string $aLogin Login
+ * @return void
*/
function login($aLogin)
{
-
$this->login = $aLogin;
-
}
/**
* Enter description here ...
*
- * @param unknown_type $aPasswd
+ * @param string $aPasswd Password
+ * @return void
*/
function passwd($aPasswd)
{
-
$this->passwd = $aPasswd;
-
-
}
/**
* Enter description here ...
*
- * @param unknown_type $aReponse
+ * @param string $aReponse Response
+ * @return void
*/
function reponse($aReponse)
{
-
$this->reponse = $aReponse;
-
}
/**
@@ -86,6 +81,7 @@ class Auth
*
* @param string $aLogin Login
* @param string $aPasswd Password
+ * @return int 0 or 1
*/
function verif($aLogin, $aPasswd)
{
diff --git a/htdocs/cashdesk/deconnexion.php b/htdocs/cashdesk/deconnexion.php
index e4bdb710310..20e058d9362 100644
--- a/htdocs/cashdesk/deconnexion.php
+++ b/htdocs/cashdesk/deconnexion.php
@@ -26,7 +26,7 @@ require_once("../main.inc.php");
// This destroy tag that say "Point of Sale session is on".
unset($_SESSION['uid']);
-header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php');
+header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php');
exit;
?>
\ No newline at end of file
diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php
index d61c1cb6f84..5bd2324d17f 100644
--- a/htdocs/cashdesk/facturation.php
+++ b/htdocs/cashdesk/facturation.php
@@ -93,28 +93,27 @@ if ( $_GET['filtre'] ) {
$tab_designations=$ret;
}
-$nbr_enreg = count ($tab_designations);
-
-if ( $nbr_enreg > 1 ) {
-
- if ( $nbr_enreg > $conf_taille_listes ) {
+$nbr_enreg = count($tab_designations);
+if ( $nbr_enreg > 1 )
+{
+ if ( $nbr_enreg > $conf_taille_listes )
+ {
$top_liste_produits = '----- '.$conf_taille_listes.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----';
-
- } else {
-
+ }
+ else
+ {
$top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----';
-
}
-} else if ( $nbr_enreg == 1 ) {
-
+}
+else if ( $nbr_enreg == 1 )
+{
$top_liste_produits = '----- 1 '.$langs->transnoentitiesnoconv("ProductFound"). ' -----';
-
-} else {
-
+}
+else
+{
$top_liste_produits = '----- '.$langs->transnoentitiesnoconv("NoProductFound"). ' -----';
-
}
@@ -152,10 +151,10 @@ $tab_tva = $ret;
// Reinitialisation du mode de paiement, en cas de retour aux achats apres validation
-$obj_facturation->mode_reglement ('RESET');
-$obj_facturation->montant_encaisse ('RESET');
-$obj_facturation->montant_rendu ('RESET');
-$obj_facturation->paiement_le ('RESET');
+$obj_facturation->mode_reglement('RESET');
+$obj_facturation->montant_encaisse('RESET');
+$obj_facturation->montant_rendu('RESET');
+$obj_facturation->paiement_le('RESET');
// Affichage des templates
diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php
index 0642bdf9f20..775d9948e77 100644
--- a/htdocs/cashdesk/facturation_dhtml.php
+++ b/htdocs/cashdesk/facturation_dhtml.php
@@ -41,7 +41,7 @@ require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php');
header("Content-type: text/html; charset=".$conf->file->character_set_client);
// Search from criteria
-if ( dol_strlen ($_GET["code"]) >= 0 ) // If search criteria is on char length at least
+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";
diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php
index d450e653d79..f4b8398cea2 100644
--- a/htdocs/cashdesk/facturation_verif.php
+++ b/htdocs/cashdesk/facturation_verif.php
@@ -25,7 +25,7 @@ require_once(DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php');
require_once(DOL_DOCUMENT_ROOT.'/product/class/product.class.php');
/** end add Ditto */
-$obj_facturation = unserialize ($_SESSION['serObjFacturation']);
+$obj_facturation = unserialize($_SESSION['serObjFacturation']);
unset ($_SESSION['serObjFacturation']);
@@ -156,9 +156,9 @@ switch ( $_GET['action'] )
}
-$_SESSION['serObjFacturation'] = serialize ($obj_facturation);
+$_SESSION['serObjFacturation'] = serialize($obj_facturation);
-header ('Location: '.$redirection);
+header('Location: '.$redirection);
exit;
?>
diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php
index 0e8a6af9265..46a8dcd1bea 100644
--- a/htdocs/cashdesk/index.php
+++ b/htdocs/cashdesk/index.php
@@ -34,7 +34,7 @@ $langs->load("cashdesk");
// Test if user logged
if ( $_SESSION['uid'] > 0 )
{
- header ('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php');
+ header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php');
exit;
}
@@ -129,7 +129,7 @@ if ($_GET['err'] < 0) {
?>
-
+