Qual: Removed warnings

This commit is contained in:
Laurent Destailleur 2011-10-13 20:32:03 +02:00
parent f671df6634
commit 8ab4ec804f
13 changed files with 60 additions and 84 deletions

View File

@ -44,7 +44,12 @@ else
}
print '<div class="liste_articles">';
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 '</div>';
print '<div class="principal">';
@ -55,11 +60,11 @@ if ( $_GET['menu'] )
}
else
{
include ('facturation.php');
include('facturation.php');
}
print '</div>';
$_SESSION['serObjFacturation'] = serialize ($obj_facturation);
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
?>

View File

@ -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;
}

View File

@ -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)
{

View File

@ -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;
?>

View File

@ -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

View File

@ -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";

View File

@ -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;
?>

View File

@ -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) {
?></div>
</div>
<?php include ('affPied.php'); ?></div>
<?php include('affPied.php'); ?></div>
</div>
</div>
</body>

View File

@ -37,14 +37,14 @@ $warehouseid = (GETPOST("warehouseid")!='')?GETPOST("warehouseid"):$conf->global
if (empty($username))
{
$retour=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Login"));
header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
exit;
}
// Check third party id
if (! ($thirdpartyid > 0))
{
$retour=$langs->trans("ErrorFieldRequired",$langs->transnoentities("CashDeskThirdPartyForSell"));
header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
exit;
}
@ -52,7 +52,7 @@ if (! ($thirdpartyid > 0))
if ($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);
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
exit;
}
@ -60,7 +60,7 @@ if (! empty($_POST['txtUsername']) && $conf->banque->enabled && (empty($conf_fka
{
$langs->load("errors");
$retour=$langs->trans("ErrorModuleSetupNotComplete");
header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
exit;
}
@ -68,7 +68,7 @@ if (! empty($_POST['txtUsername']) && $conf->banque->enabled && (empty($conf_fka
// Check password
$auth = new Auth($db);
$retour = $auth->verif ($username, $password);
$retour = $auth->verif($username, $password);
if ( $retour >= 0 )
{
@ -97,7 +97,7 @@ if ( $retour >= 0 )
$_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid;
//var_dump($_SESSION);exit;
header ('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation&id=NOUV');
header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php?menu=facturation&id=NOUV');
exit;
}
else
@ -111,7 +111,7 @@ else
$langs->load("errors");
$langs->load("other");
$retour=$langs->trans("ErrorBadLoginPassword");
header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
exit;
}

View File

@ -1,24 +0,0 @@
<?php
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
* Copyright (C) 2008 Laurent Destailleur <eldy@uers.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
require ('tpl/liste_articles.tpl.php');
$obj_facturation->prix_total_ht ($lst_total_ht);
$obj_facturation->prix_total_ttc ($lst_total_ttc);
?>

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2007-2008 J<EFBFBD>r<EFBFBD>mie Ollivier <jeremie.o@laposte.net>
/* Copyright (C) 2007-2008 Jeremie Ollivier <jeremie.o@laposte.net>
*
* 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
@ -15,7 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Affichage des templates
require ('tpl/validation1.tpl.php');
// Affichage des templates
require ('tpl/validation1.tpl.php');
?>

View File

@ -19,14 +19,14 @@ require('../main.inc.php');
require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php');
require_once(DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php');
$obj_facturation = unserialize ($_SESSION['serObjFacturation']);
unset ($_SESSION['serObjFacturation']);
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
unset($_SESSION['serObjFacturation']);
require ('tpl/ticket.tpl.php');
$_SESSION['serObjFacturation'] = serialize ($obj_facturation);
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
?>

View File

@ -51,7 +51,7 @@ switch ($action)
$obj_facturation->num_facture($num);
$obj_facturation->mode_reglement ($_POST['hdnChoix']);
$obj_facturation->mode_reglement($_POST['hdnChoix']);
// Si paiement autre qu'en especes, montant encaisse = prix total
$mode_reglement = $obj_facturation->mode_reglement();
@ -65,7 +65,7 @@ switch ($action)
$obj_facturation->montant_encaisse($montant);
//Determination de la somme rendue
$total = $obj_facturation->prix_total_ttc ();
$total = $obj_facturation->prix_total_ttc();
$encaisse = $obj_facturation->montant_encaisse();
$obj_facturation->montant_rendu($encaisse - $total);
@ -283,7 +283,7 @@ switch ($action)
$_SESSION['serObjFacturation'] = serialize ($obj_facturation);
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
header ('Location: '.$redirection);
header('Location: '.$redirection);
?>