Clean code
This commit is contained in:
parent
5f897eb7ee
commit
fc4103b469
@ -42,9 +42,9 @@ if (! $user->rights->categorie->lire) accessforbidden();
|
|||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int');
|
||||||
$type=(GETPOST('type','aZ09') ? GETPOST('type','aZ09') : Categorie::TYPE_PRODUCT);
|
$type=(GETPOST('type','aZ09') ? GETPOST('type','aZ09') : Categorie::TYPE_PRODUCT);
|
||||||
$catname=GETPOST('catname','alpha');
|
$catname=GETPOST('catname','alpha');
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action','alpha');
|
||||||
$printer1=GETPOST('printer1');
|
$printer1=GETPOST('printer1','alpha');
|
||||||
$printer2=GETPOST('printer2');
|
$printer2=GETPOST('printer2','alpha');
|
||||||
|
|
||||||
if (is_numeric($type)) $type=Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
if (is_numeric($type)) $type=Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility
|
||||||
|
|
||||||
|
|||||||
@ -35,8 +35,7 @@ if (! empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id']))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (!$user->admin)
|
if (!$user->admin) accessforbidden();
|
||||||
accessforbidden();
|
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
$langs->load("cashdesk");
|
$langs->load("cashdesk");
|
||||||
|
|||||||
@ -33,9 +33,9 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
|||||||
require '../main.inc.php'; // Load $user and permissions
|
require '../main.inc.php'; // Load $user and permissions
|
||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
|
|
||||||
$category = GETPOST('category');
|
$category = GETPOST('category','alpha');
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action','alpha');
|
||||||
$term = GETPOST('term');
|
$term = GETPOST('term','alpha');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -37,17 +37,23 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
||||||
|
|
||||||
$langs->loadLangs(array("companies", "commercial", "customers", "suppliers", "bills", "compta", "categories"));
|
$langs->loadLangs(array("companies", "commercial", "customers", "suppliers", "bills", "compta", "categories", "cashdesk"));
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$massaction=GETPOST('massaction','alpha');
|
$massaction=GETPOST('massaction','alpha');
|
||||||
$show_files=GETPOST('show_files','int');
|
$show_files=GETPOST('show_files','int');
|
||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
$idcustomer = GETPOST('idcustomer');
|
$idcustomer = GETPOST('idcustomer','int');
|
||||||
$place = GETPOST('place');
|
$place = GETPOST('place','int');
|
||||||
|
|
||||||
$_GET['optioncss'] = 'print';
|
$_GET['optioncss'] = 'print';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Actions
|
||||||
|
*/
|
||||||
|
|
||||||
if ($action=="change") {
|
if ($action=="change") {
|
||||||
$sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where facnumber='(PROV-POS-".$place.")'";
|
$sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$idcustomer." where facnumber='(PROV-POS-".$place.")'";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|||||||
@ -29,15 +29,15 @@ $_GET['theme']="md"; // Force theme. MD theme provides better look and feel to T
|
|||||||
|
|
||||||
require '../main.inc.php'; // Load $user and permissions
|
require '../main.inc.php'; // Load $user and permissions
|
||||||
|
|
||||||
$floor=GETPOST('floor');
|
$floor=GETPOST('floor','alpha');
|
||||||
if ($floor=="") $floor=1;
|
if ($floor=="") $floor=1;
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action','alpha');
|
||||||
$left = GETPOST('left');
|
$left = GETPOST('left','alpha');
|
||||||
$top = GETPOST('top');
|
$top = GETPOST('top','alpha');
|
||||||
$place = GETPOST('place');
|
$place = GETPOST('place','int');
|
||||||
$newname = GETPOST('newname');
|
$newname = GETPOST('newname');
|
||||||
$mode = GETPOST('mode');
|
$mode = GETPOST('mode','alpha');
|
||||||
|
|
||||||
if ($action=="getTables"){
|
if ($action=="getTables"){
|
||||||
$sql="SELECT * from ".MAIN_DB_PREFIX."takepos_floor_tables where floor=".$floor;
|
$sql="SELECT * from ".MAIN_DB_PREFIX."takepos_floor_tables where floor=".$floor;
|
||||||
|
|||||||
@ -29,7 +29,8 @@ require '../main.inc.php'; // Load $user and permissions
|
|||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("cashdesk");
|
$langs->load("cashdesk");
|
||||||
$place = GETPOST('place');
|
|
||||||
|
$place = GETPOST('place','int');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -32,13 +32,13 @@ require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("cashdesk");
|
$langs->load("cashdesk");
|
||||||
|
|
||||||
$id = GETPOST('id');
|
$id = GETPOST('id','int');
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action','alpha');
|
||||||
$idproduct = GETPOST('idproduct');
|
$idproduct = GETPOST('idproduct','int');
|
||||||
$place = GETPOST('place');
|
$place = GETPOST('place','int');
|
||||||
$number = GETPOST('number');
|
$number = GETPOST('number');
|
||||||
$idline = GETPOST('idline');
|
$idline = GETPOST('idline');
|
||||||
$desc = GETPOST('desc');
|
$desc = GETPOST('desc','alpha');
|
||||||
$pay = GETPOST('pay');
|
$pay = GETPOST('pay');
|
||||||
|
|
||||||
$sql="SELECT rowid FROM ".MAIN_DB_PREFIX."facture where facnumber='(PROV-POS-".$place.")'";
|
$sql="SELECT rowid FROM ".MAIN_DB_PREFIX."facture where facnumber='(PROV-POS-".$place.")'";
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $_GET['theme']="md"; // Force theme. MD theme provides better look and feel to T
|
|||||||
require '../main.inc.php'; // Load $user and permissions
|
require '../main.inc.php'; // Load $user and permissions
|
||||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||||
|
|
||||||
$place = GETPOST('place');
|
$place = GETPOST('place','int');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -32,9 +32,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
|
||||||
|
|
||||||
$place = GETPOST('place');
|
$place = GETPOST('place','int');
|
||||||
if ($place=="") $place="0";
|
if ($place=="") $place="0";
|
||||||
$action = GETPOST('action');
|
$action = GETPOST('action','alpha');
|
||||||
|
|
||||||
$langs->loadLangs(array("bills","orders","commercial","cashdesk"));
|
$langs->loadLangs(array("bills","orders","commercial","cashdesk"));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user