forked from Wavyzz/dolibarr
Merge branch 'develop' into toomanylines
This commit is contained in:
@@ -191,6 +191,15 @@
|
|||||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose" />
|
||||||
|
|
||||||
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
<rule ref="Squiz.Functions.MultiLineFunctionDeclaration" />
|
||||||
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing">
|
||||||
|
<properties>
|
||||||
|
<property name="equalsSpacing" value="1"/>
|
||||||
|
</properties>
|
||||||
|
</rule>
|
||||||
|
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterHint">
|
||||||
|
<severity>0</severity>
|
||||||
|
</rule>
|
||||||
|
|
||||||
|
|
||||||
<!-- Rules from PEAR Standard -->
|
<!-- Rules from PEAR Standard -->
|
||||||
|
|
||||||
@@ -390,6 +399,10 @@
|
|||||||
</rule>
|
</rule>
|
||||||
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
<rule ref="PEAR.NamingConventions.ValidVariableName" />
|
||||||
|
|
||||||
|
<rule ref="PSR2.Classes.ClassDeclaration" />
|
||||||
|
<rule ref="PSR2.Methods.FunctionClosingBrace" />
|
||||||
|
<rule ref="PSR2.ControlStructures.ElseIfDeclaration.NotAllowed" />
|
||||||
|
|
||||||
<!-- This is not in PSR2 -->
|
<!-- This is not in PSR2 -->
|
||||||
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
<rule ref="PEAR.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||||
<severity>0</severity>
|
<severity>0</severity>
|
||||||
|
|||||||
@@ -96,9 +96,7 @@ if ($action == "set")
|
|||||||
{
|
{
|
||||||
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "PRELEVEMENT_ADDDAYS", GETPOST("PRELEVEMENT_ADDDAYS"),'chaine',0,'',$conf->entity);
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
} else
|
} elseif (! $error)
|
||||||
|
|
||||||
if (! $error)
|
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@@ -44,7 +44,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active generation models
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param integer $maxfilenamelength Max length of value to show
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
@@ -56,12 +56,12 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$type='shipping';
|
$type='shipping';
|
||||||
$liste=array();
|
$list=array();
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
$list=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ abstract class ModelNumRefExpedition
|
|||||||
/**
|
/**
|
||||||
* Test if existing numbers make problems with numbering
|
* Test if existing numbers make problems with numbering
|
||||||
*
|
*
|
||||||
* @return boolean false if conflit, true if ok
|
* @return boolean false if conflict, true if ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
function canBeActivated()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,12 +19,12 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/core/modules/expensereport/mod_expensereport_jade.php
|
* \file htdocs/core/modules/expensereport/mod_expensereport_jade.php
|
||||||
* \ingroup expensereport
|
* \ingroup expensereport
|
||||||
* \brief File of class to manage customer order numbering rules Jade
|
* \brief File of class to manage expensereport numbering rules Jade
|
||||||
*/
|
*/
|
||||||
require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expensereport.php';
|
require_once DOL_DOCUMENT_ROOT .'/core/modules/expensereport/modules_expensereport.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage customer order numbering rules Jade
|
* Class to manage expensereport numbering rules Jade
|
||||||
*/
|
*/
|
||||||
class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
||||||
{
|
{
|
||||||
@@ -55,7 +55,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return description of numbering module
|
* Return description of numbering model
|
||||||
*
|
*
|
||||||
* @return string Text with description
|
* @return string Text with description
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +67,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoi un exemple de numerotation
|
* Returns an example of numbering
|
||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
@@ -78,8 +78,8 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test si les numeros deje en vigueur dans la base ne provoquent pas de
|
* Test whether the numbers already in force in the base do not cause conflicts
|
||||||
* de conflits qui empechera cette numerotation de fonctionner.
|
* that would prevent this numbering from working.
|
||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false si conflit, true si ok
|
||||||
*/
|
*/
|
||||||
@@ -174,7 +174,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport
|
|||||||
return $newref;
|
return $newref;
|
||||||
}
|
}
|
||||||
|
|
||||||
// D'abord on recupere la valeur max
|
// First we get the max value
|
||||||
$posindice=8;
|
$posindice=8;
|
||||||
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
|
$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport";
|
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport";
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
|||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active models generation
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param integer $maxfilenamelength Max length of value to show
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
@@ -43,12 +43,12 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$type='expensereport';
|
$type='expensereport';
|
||||||
$liste=array();
|
$list=array();
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
$list=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,10 +57,10 @@ abstract class ModeleExpenseReport extends CommonDocGenerator
|
|||||||
* expensereport_pdf_create
|
* expensereport_pdf_create
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param ExpenseReport $object Object order
|
* @param ExpenseReport $object Object ExpenseReport
|
||||||
* @param string $message Message
|
* @param string $message Message
|
||||||
* @param string $modele Force le modele a utiliser ('' to not force)
|
* @param string $modele Force the model to use ('' to not force)
|
||||||
* @param Translate $outputlangs objet lang a utiliser pour traduction
|
* @param Translate $outputlangs lang object to use for translation
|
||||||
* @param int $hidedetails Hide details of lines
|
* @param int $hidedetails Hide details of lines
|
||||||
* @param int $hidedesc Hide description
|
* @param int $hidedesc Hide description
|
||||||
* @param int $hideref Hide ref
|
* @param int $hideref Hide ref
|
||||||
@@ -85,9 +85,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
public $error='';
|
public $error='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a module can be used or not
|
* Return if a model can be used or not
|
||||||
*
|
*
|
||||||
* @return boolean true if module can be used
|
* @return boolean true if model can be used
|
||||||
*/
|
*/
|
||||||
function isEnabled()
|
function isEnabled()
|
||||||
{
|
{
|
||||||
@@ -95,9 +95,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie la description par defaut du modele de numerotation
|
* Returns the default description of the numbering model
|
||||||
*
|
*
|
||||||
* @return string Texte descripif
|
* @return string Descriptive text
|
||||||
*/
|
*/
|
||||||
function info()
|
function info()
|
||||||
{
|
{
|
||||||
@@ -107,7 +107,7 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie un exemple de numerotation
|
* Returns an example of numbering
|
||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
@@ -119,9 +119,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test si les numeros deja en vigueur dans la base ne provoquent pas de conflits qui empecheraient cette numerotation de fonctionner.
|
* Test whether the numbers already in force in the base do not cause conflicts that would prevent this numbering from working.
|
||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false if conflict, true if ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
function canBeActivated()
|
||||||
{
|
{
|
||||||
@@ -129,10 +129,10 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie prochaine valeur attribuee
|
* Returns next assigned value
|
||||||
*
|
*
|
||||||
* @param Object $object Object we need next value for
|
* @param Object $object Object we need next value for
|
||||||
* @return string Valeur
|
* @return string Value
|
||||||
*/
|
*/
|
||||||
function getNextValue($object)
|
function getNextValue($object)
|
||||||
{
|
{
|
||||||
@@ -141,9 +141,9 @@ abstract class ModeleNumRefExpenseReport
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Renvoie version du module numerotation
|
* Returns the version of the numbering module
|
||||||
*
|
*
|
||||||
* @return string Valeur
|
* @return string Value
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
function getVersion()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ class ProductFournisseur extends Product
|
|||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
// End call triggers
|
// End call triggers
|
||||||
if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
|
if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
|
||||||
$result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrenc, $multicurrency_code);
|
$result = $this->logPrice($user, $now, $buyprice, $qty, $multicurrency_buyprice, $multicurrency_unitBuyPrice, $multicurrency_tx, $fk_multicurrency, $multicurrency_code);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,3 +53,4 @@ NbOfInvoices=Nb of invoices
|
|||||||
Paymentnumpad=Payment Num Pad
|
Paymentnumpad=Payment Num Pad
|
||||||
Numberspad=Numbers Pad
|
Numberspad=Numbers Pad
|
||||||
BillsCoinsPad=Bills and Coins Pad
|
BillsCoinsPad=Bills and Coins Pad
|
||||||
|
DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr
|
||||||
@@ -273,14 +273,14 @@ print '<br><br>';
|
|||||||
// Marketplace
|
// Marketplace
|
||||||
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
|
||||||
print "<tr class=\"liste_titre\">\n";
|
print "<tr class=\"liste_titre\">\n";
|
||||||
print '<td colspan="2">TakePOS Marketplace</td>';
|
print '<td colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
|
||||||
print '<td>'.$langs->trans("URL").'</td>';
|
print '<td>'.$langs->trans("URL").'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
print "<tr class=\"oddeven\">\n";
|
print "<tr class=\"oddeven\">\n";
|
||||||
$url='https://www.dolistore.com/en/modules/980-TakePOS-7-mobile.html';
|
$url='https://www.dolistore.com/45-pos';
|
||||||
print '<td class="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/marketplace/takeposmobile.jpg"></a></td>';
|
print '<td class="left"><a href="'.$url.'" target="_blank" rel="external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
|
||||||
print '<td>TakePOS for mobile devices</td>';
|
print '<td>'.$langs->trans("DolistorePosCategory").'</td>';
|
||||||
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
print '<td><a href="'.$url.'" target="_blank" rel="external">'.$url.'</a></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,6 @@ html,body {
|
|||||||
padding:0;
|
padding:0;
|
||||||
margin:0;
|
margin:0;
|
||||||
height:100%;
|
height:100%;
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +87,7 @@ div.wrapper{
|
|||||||
div.wrapper2{
|
div.wrapper2{
|
||||||
float:left; /* important */
|
float:left; /* important */
|
||||||
position:relative; /* important(so we can absolutely position the description div */
|
position:relative; /* important(so we can absolutely position the description div */
|
||||||
width:10.2%;
|
width:10.9%;
|
||||||
height:23%;
|
height:23%;
|
||||||
margin-top:0.5%;
|
margin-top:0.5%;
|
||||||
margin-bottom:0.5%;
|
margin-bottom:0.5%;
|
||||||
@@ -126,6 +123,68 @@ div.description{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container{
|
||||||
|
width: 98%;
|
||||||
|
height: 98%;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: visible;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row1{
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 34%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row2{
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 100%;
|
||||||
|
height: 66%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div1{
|
||||||
|
height:100%;
|
||||||
|
width: 33%;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div2{
|
||||||
|
height: 100%;
|
||||||
|
width: 33%;
|
||||||
|
font-size: 0;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
padding-left: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div3{
|
||||||
|
height: 100%;
|
||||||
|
width: 33%;
|
||||||
|
float: left;
|
||||||
|
text-align: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div4{
|
||||||
|
height: 100%;
|
||||||
|
width: 34%;
|
||||||
|
float: left;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.div5{
|
||||||
|
height: 100%;
|
||||||
|
width: 66%;
|
||||||
|
float: left;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
p.description_content{
|
p.description_content{
|
||||||
padding:10px;
|
padding:10px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 56 KiB |
@@ -125,8 +125,7 @@ if ($action == "deleteline") {
|
|||||||
$invoice->deleteline($idline);
|
$invoice->deleteline($idline);
|
||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
}
|
}
|
||||||
else
|
elseif ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line
|
||||||
if ($placeid > 0) { //If exist invoice, but no line selected, proced to delete last line
|
|
||||||
$sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture='$placeid' order by rowid DESC";
|
$sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture='$placeid' order by rowid DESC";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
$row = $db->fetch_array($resql);
|
$row = $db->fetch_array($resql);
|
||||||
@@ -325,7 +324,7 @@ if ($placeid > 0) {
|
|||||||
if ($line->special_code == "3") { print ' order';
|
if ($line->special_code == "3") { print ' order';
|
||||||
}
|
}
|
||||||
print '" id="' . $line->rowid . '">';
|
print '" id="' . $line->rowid . '">';
|
||||||
print '<td>' . $line->product_label . $line->desc . '</td>';
|
print '<td align="left">' . $line->product_label . $line->desc . '</td>';
|
||||||
print '<td align="right">' . $line->qty . '</td>';
|
print '<td align="right">' . $line->qty . '</td>';
|
||||||
print '<td align="right">' . price($line->total_ttc) . '</td>';
|
print '<td align="right">' . price($line->total_ttc) . '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ $head='<meta name="apple-mobile-web-app-title" content="TakePOS"/>
|
|||||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<link rel="stylesheet" href="css/pos.css?a=xxx">
|
<link rel="stylesheet" href="css/pos.css">
|
||||||
<script type="text/javascript" src="js/takepos.js" ></script>
|
<script type="text/javascript" src="js/takepos.js" ></script>
|
||||||
<link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" />
|
<link rel="stylesheet" href="css/colorbox.css" type="text/css" media="screen" />
|
||||||
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>
|
<script type="text/javascript" src="js/jquery.colorbox-min.js"></script>
|
||||||
@@ -353,10 +353,13 @@ $( document ).ready(function() {
|
|||||||
|
|
||||||
<body style="overflow: hidden; background-color:#E8E8E8;">
|
<body style="overflow: hidden; background-color:#E8E8E8;">
|
||||||
|
|
||||||
<div id="poslines" style="position:absolute; top:2%; left:0.5%; height:36%; width:31%; overflow: auto;">
|
<div class="container">
|
||||||
|
<div class="row1">
|
||||||
|
|
||||||
|
<div id="poslines" class="div1" style="overflow: auto;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position:absolute; top:1%; left:32.5%; height:37%; width:32.5%; font-size: 0;">
|
<div class="div2">
|
||||||
<button type="button" class="calcbutton" onclick="Edit(7);">7</button>
|
<button type="button" class="calcbutton" onclick="Edit(7);">7</button>
|
||||||
<button type="button" class="calcbutton" onclick="Edit(8);">8</button>
|
<button type="button" class="calcbutton" onclick="Edit(8);">8</button>
|
||||||
<button type="button" class="calcbutton" onclick="Edit(9);">9</button>
|
<button type="button" class="calcbutton" onclick="Edit(9);">9</button>
|
||||||
@@ -420,7 +423,7 @@ if (!empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<div style="position:absolute; top:1%; left:65.5%; height:37%; width:32.5%;">
|
<div class="div3">
|
||||||
<?php
|
<?php
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach($menus as $menu) {
|
foreach($menus as $menu) {
|
||||||
@@ -435,8 +438,9 @@ foreach($menus as $menu) {
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div style="position:absolute; top:39%; left:0.3%; height:59%; width:32%;">
|
<div class="row2">
|
||||||
|
<div class="div4">
|
||||||
<?php
|
<?php
|
||||||
$count=0;
|
$count=0;
|
||||||
while ($count<16)
|
while ($count<16)
|
||||||
@@ -454,7 +458,7 @@ foreach($menus as $menu) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="position:absolute; top:39%; left:32%; height:58%; width:72%;">
|
<div class="div5">
|
||||||
<?php
|
<?php
|
||||||
$count=0;
|
$count=0;
|
||||||
while ($count<32)
|
while ($count<32)
|
||||||
@@ -471,7 +475,8 @@ while ($count<32)
|
|||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
use Luracast\Restler\RestException;
|
use Luracast\Restler\RestException;
|
||||||
|
|
||||||
//require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API class for users
|
* API class for users
|
||||||
@@ -231,6 +232,41 @@ class Users extends DolibarrApi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List the groups of a user
|
||||||
|
*
|
||||||
|
* @param int $id Id of user
|
||||||
|
* @return array Array of group objects
|
||||||
|
*
|
||||||
|
* @throws RestException
|
||||||
|
*
|
||||||
|
* @url GET {id}/groups
|
||||||
|
*/
|
||||||
|
function getGroups($id)
|
||||||
|
{
|
||||||
|
$obj_ret = array();
|
||||||
|
|
||||||
|
if (! DolibarrApiAccess::$user->rights->user->user->lire) {
|
||||||
|
throw new RestException(401);
|
||||||
|
}
|
||||||
|
|
||||||
|
$user = new User($this->db);
|
||||||
|
$result = $user->fetch($id);
|
||||||
|
if( ! $result ) {
|
||||||
|
throw new RestException(404, 'user not found');
|
||||||
|
}
|
||||||
|
|
||||||
|
$usergroup = new UserGroup($this->db);
|
||||||
|
$groups = $usergroup->listGroupsForUser($id, false);
|
||||||
|
$obj_ret = array();
|
||||||
|
foreach ($groups as $group) {
|
||||||
|
$obj_ret[] = $this->_cleanObjectDatas($group);
|
||||||
|
}
|
||||||
|
return $obj_ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a user into a group
|
* Add a user into a group
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user