Fix: Activate of point of sale module was broken
This commit is contained in:
parent
e5e80de504
commit
f0fc5637bd
@ -18,7 +18,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This page is called each time we press a key in the code or description
|
||||
* This page is called each time we press a key in the code
|
||||
* search form to show product combo list.
|
||||
*/
|
||||
|
||||
@ -50,7 +50,15 @@ if ( strlen ($_GET["code"]) >= 0 ) // If search criteria is on char length at le
|
||||
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.envente = 1";
|
||||
$sql.= " AND p.fk_product_type = 0";
|
||||
$sql.= " AND (p.ref LIKE '%".$_GET['code']."%' OR p.label LIKE '%".$_GET['code']."%')";
|
||||
// Add criteria on ref/label
|
||||
if (! empty($conf->global->PRODUCT_DONOTSEARCH_ANYWHERE))
|
||||
{
|
||||
$sql.= " AND (p.ref LIKE '".$_GET['code']."%' OR p.label LIKE '".$_GET['code']."%')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql.= " AND (p.ref LIKE '%".$_GET['code']."%' OR p.label LIKE '%".$_GET['code']."%')";
|
||||
}
|
||||
$sql.= " ORDER BY label";
|
||||
|
||||
dol_syslog("facturation_dhtml.php sql=".$sql);
|
||||
|
||||
@ -101,7 +101,7 @@ class modCashDesk extends DolibarrModules
|
||||
'langs'=>'@cashdesk', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position'=>100,
|
||||
'perms'=>1, // Use 'perms'=>'1' if you want your menu with no permission rules
|
||||
'target'=>'',
|
||||
'target'=>'pointofsale',
|
||||
'user'=>0); // 0=Menu for internal users, 1=external users, 2=both
|
||||
|
||||
$r++;
|
||||
|
||||
@ -230,7 +230,7 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1)
|
||||
$result=$db->query($newsql,$usesavepoint);
|
||||
if ($result)
|
||||
{
|
||||
print '<!-- Result = OK -->'."\n";
|
||||
if (! $silent) print '<!-- Result = OK -->'."\n";
|
||||
|
||||
if (preg_replace('/insert into ([^\s]+)/i',$newsql,$reg))
|
||||
{
|
||||
@ -247,7 +247,7 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1)
|
||||
else
|
||||
{
|
||||
$errno=$db->errno();
|
||||
print '<!-- Result = '.$errno.' -->'."\n";
|
||||
if (! $silent) print '<!-- Result = '.$errno.' -->'."\n";
|
||||
|
||||
$okerror=array( 'DB_ERROR_TABLE_ALREADY_EXISTS',
|
||||
'DB_ERROR_COLUMN_ALREADY_EXISTS',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user