Qual: Removed warnings
This commit is contained in:
parent
f671df6634
commit
8ab4ec804f
@ -44,7 +44,12 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
print '<div class="liste_articles">';
|
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>';
|
||||||
|
|
||||||
print '<div class="principal">';
|
print '<div class="principal">';
|
||||||
@ -55,11 +60,11 @@ if ( $_GET['menu'] )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
include ('facturation.php');
|
include('facturation.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
$_SESSION['serObjFacturation'] = serialize ($obj_facturation);
|
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -29,7 +29,7 @@ require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php');
|
|||||||
// Test if already logged
|
// Test if already logged
|
||||||
if ( $_SESSION['uid'] <= 0 )
|
if ( $_SESSION['uid'] <= 0 )
|
||||||
{
|
{
|
||||||
header ('Location: index.php');
|
header('Location: index.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -34,51 +34,46 @@ class Auth
|
|||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $DB
|
* @param DoliDB $DB Database handler
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function Auth($DB)
|
function Auth($DB)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->db = $DB;
|
$this->db = $DB;
|
||||||
$this->reponse(null);
|
$this->reponse(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $aLogin
|
* @param string $aLogin Login
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function login($aLogin)
|
function login($aLogin)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->login = $aLogin;
|
$this->login = $aLogin;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $aPasswd
|
* @param string $aPasswd Password
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function passwd($aPasswd)
|
function passwd($aPasswd)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->passwd = $aPasswd;
|
$this->passwd = $aPasswd;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enter description here ...
|
* Enter description here ...
|
||||||
*
|
*
|
||||||
* @param unknown_type $aReponse
|
* @param string $aReponse Response
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function reponse($aReponse)
|
function reponse($aReponse)
|
||||||
{
|
{
|
||||||
|
|
||||||
$this->reponse = $aReponse;
|
$this->reponse = $aReponse;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -86,6 +81,7 @@ class Auth
|
|||||||
*
|
*
|
||||||
* @param string $aLogin Login
|
* @param string $aLogin Login
|
||||||
* @param string $aPasswd Password
|
* @param string $aPasswd Password
|
||||||
|
* @return int 0 or 1
|
||||||
*/
|
*/
|
||||||
function verif($aLogin, $aPasswd)
|
function verif($aLogin, $aPasswd)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,7 @@ require_once("../main.inc.php");
|
|||||||
// This destroy tag that say "Point of Sale session is on".
|
// This destroy tag that say "Point of Sale session is on".
|
||||||
unset($_SESSION['uid']);
|
unset($_SESSION['uid']);
|
||||||
|
|
||||||
header ('Location: '.DOL_URL_ROOT.'/cashdesk/index.php');
|
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php');
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@ -93,28 +93,27 @@ if ( $_GET['filtre'] ) {
|
|||||||
$tab_designations=$ret;
|
$tab_designations=$ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
$nbr_enreg = count ($tab_designations);
|
$nbr_enreg = count($tab_designations);
|
||||||
|
|
||||||
if ( $nbr_enreg > 1 ) {
|
|
||||||
|
|
||||||
if ( $nbr_enreg > $conf_taille_listes ) {
|
|
||||||
|
|
||||||
|
if ( $nbr_enreg > 1 )
|
||||||
|
{
|
||||||
|
if ( $nbr_enreg > $conf_taille_listes )
|
||||||
|
{
|
||||||
$top_liste_produits = '----- '.$conf_taille_listes.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----';
|
$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.' -----';
|
$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"). ' -----';
|
$top_liste_produits = '----- 1 '.$langs->transnoentitiesnoconv("ProductFound"). ' -----';
|
||||||
|
}
|
||||||
} else {
|
else
|
||||||
|
{
|
||||||
$top_liste_produits = '----- '.$langs->transnoentitiesnoconv("NoProductFound"). ' -----';
|
$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
|
// Reinitialisation du mode de paiement, en cas de retour aux achats apres validation
|
||||||
$obj_facturation->mode_reglement ('RESET');
|
$obj_facturation->mode_reglement('RESET');
|
||||||
$obj_facturation->montant_encaisse ('RESET');
|
$obj_facturation->montant_encaisse('RESET');
|
||||||
$obj_facturation->montant_rendu ('RESET');
|
$obj_facturation->montant_rendu('RESET');
|
||||||
$obj_facturation->paiement_le ('RESET');
|
$obj_facturation->paiement_le('RESET');
|
||||||
|
|
||||||
|
|
||||||
// Affichage des templates
|
// Affichage des templates
|
||||||
|
|||||||
@ -41,7 +41,7 @@ require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php');
|
|||||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||||
|
|
||||||
// Search from criteria
|
// 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";
|
$sql = "SELECT p.rowid, p.ref, p.label, p.tva_tx";
|
||||||
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
if ($conf->stock->enabled && !empty($conf_fkentrepot)) $sql.= ", ps.reel";
|
||||||
|
|||||||
@ -25,7 +25,7 @@ require_once(DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php');
|
|||||||
require_once(DOL_DOCUMENT_ROOT.'/product/class/product.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/product/class/product.class.php');
|
||||||
/** end add Ditto */
|
/** end add Ditto */
|
||||||
|
|
||||||
$obj_facturation = unserialize ($_SESSION['serObjFacturation']);
|
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
|
||||||
unset ($_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;
|
exit;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -34,7 +34,7 @@ $langs->load("cashdesk");
|
|||||||
// Test if user logged
|
// Test if user logged
|
||||||
if ( $_SESSION['uid'] > 0 )
|
if ( $_SESSION['uid'] > 0 )
|
||||||
{
|
{
|
||||||
header ('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php');
|
header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php');
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ if ($_GET['err'] < 0) {
|
|||||||
?></div>
|
?></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include ('affPied.php'); ?></div>
|
<?php include('affPied.php'); ?></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@ -37,14 +37,14 @@ $warehouseid = (GETPOST("warehouseid")!='')?GETPOST("warehouseid"):$conf->global
|
|||||||
if (empty($username))
|
if (empty($username))
|
||||||
{
|
{
|
||||||
$retour=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Login"));
|
$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;
|
exit;
|
||||||
}
|
}
|
||||||
// Check third party id
|
// Check third party id
|
||||||
if (! ($thirdpartyid > 0))
|
if (! ($thirdpartyid > 0))
|
||||||
{
|
{
|
||||||
$retour=$langs->trans("ErrorFieldRequired",$langs->transnoentities("CashDeskThirdPartyForSell"));
|
$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;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,7 +52,7 @@ if (! ($thirdpartyid > 0))
|
|||||||
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_BILL && ! ($warehouseid > 0))
|
if ($conf->stock->enabled && $conf->global->STOCK_CALCULATE_ON_BILL && ! ($warehouseid > 0))
|
||||||
{
|
{
|
||||||
$retour=$langs->trans("CashDeskSetupStock");
|
$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;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ if (! empty($_POST['txtUsername']) && $conf->banque->enabled && (empty($conf_fka
|
|||||||
{
|
{
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$retour=$langs->trans("ErrorModuleSetupNotComplete");
|
$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;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ if (! empty($_POST['txtUsername']) && $conf->banque->enabled && (empty($conf_fka
|
|||||||
|
|
||||||
// Check password
|
// Check password
|
||||||
$auth = new Auth($db);
|
$auth = new Auth($db);
|
||||||
$retour = $auth->verif ($username, $password);
|
$retour = $auth->verif($username, $password);
|
||||||
|
|
||||||
if ( $retour >= 0 )
|
if ( $retour >= 0 )
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ if ( $retour >= 0 )
|
|||||||
$_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid;
|
$_SESSION['CASHDESK_ID_WAREHOUSE'] = $warehouseid;
|
||||||
//var_dump($_SESSION);exit;
|
//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;
|
exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -111,7 +111,7 @@ else
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$langs->load("other");
|
$langs->load("other");
|
||||||
$retour=$langs->trans("ErrorBadLoginPassword");
|
$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;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
|
||||||
|
|
||||||
?>
|
|
||||||
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?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
|
* 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
|
* 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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Affichage des templates
|
// Affichage des templates
|
||||||
require ('tpl/validation1.tpl.php');
|
require ('tpl/validation1.tpl.php');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -19,14 +19,14 @@ require('../main.inc.php');
|
|||||||
require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php');
|
require_once(DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php');
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php');
|
||||||
|
|
||||||
$obj_facturation = unserialize ($_SESSION['serObjFacturation']);
|
$obj_facturation = unserialize($_SESSION['serObjFacturation']);
|
||||||
unset ($_SESSION['serObjFacturation']);
|
unset($_SESSION['serObjFacturation']);
|
||||||
|
|
||||||
|
|
||||||
require ('tpl/ticket.tpl.php');
|
require ('tpl/ticket.tpl.php');
|
||||||
|
|
||||||
|
|
||||||
$_SESSION['serObjFacturation'] = serialize ($obj_facturation);
|
$_SESSION['serObjFacturation'] = serialize($obj_facturation);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ switch ($action)
|
|||||||
|
|
||||||
$obj_facturation->num_facture($num);
|
$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
|
// Si paiement autre qu'en especes, montant encaisse = prix total
|
||||||
$mode_reglement = $obj_facturation->mode_reglement();
|
$mode_reglement = $obj_facturation->mode_reglement();
|
||||||
@ -65,7 +65,7 @@ switch ($action)
|
|||||||
$obj_facturation->montant_encaisse($montant);
|
$obj_facturation->montant_encaisse($montant);
|
||||||
|
|
||||||
//Determination de la somme rendue
|
//Determination de la somme rendue
|
||||||
$total = $obj_facturation->prix_total_ttc ();
|
$total = $obj_facturation->prix_total_ttc();
|
||||||
$encaisse = $obj_facturation->montant_encaisse();
|
$encaisse = $obj_facturation->montant_encaisse();
|
||||||
|
|
||||||
$obj_facturation->montant_rendu($encaisse - $total);
|
$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);
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user