Compare commits

...

53 Commits
14.0.1 ... 11.0

Author SHA1 Message Date
Laurent Destailleur
a186e16568 Backport fix for mysql 8 export 2024-10-29 15:32:54 +01:00
Laurent Destailleur
a621032643 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:28:05 +02:00
Laurent Destailleur
32646cb7f4 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2024-09-29 19:25:49 +02:00
Florian Mortgat
74b67eb6c6 FIX - use price() to display qty on a product's stats tab to avoid showing too many decimals when rounding errors are possible (#31165) 2024-09-29 15:57:05 +02:00
Laurent Destailleur
667890247c Merge remote-tracking branch 'origin/10.0' into 11.0 2024-09-26 18:46:30 +02:00
Florian Mortgat
c727bbb530 FIX: when qty is not an integer, apply price() (#31138)
* FIX: when qty is not an integer, apply price() to avoid displaying precision errors if php.ini's precision settings are too high

* Apply eldy's suggestion to use price's parameters rather than a test
2024-09-26 18:41:41 +02:00
Laurent Destailleur
973a2ede97 Fix syntax error 2023-08-10 11:35:19 +02:00
Laurent Destailleur
e8fd551043 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2023-08-10 10:43:44 +02:00
Laurent Destailleur
34b3113bb7 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2023-08-10 10:41:20 +02:00
Laurent Destailleur
90854dc2bf FIX Use the wrong logo size on PDF 2023-07-30 19:53:56 +02:00
Laurent Destailleur
b44ddaa696 FIX Use the wrong logo size on PDF 2023-07-30 18:04:03 +02:00
Laurent Destailleur
03a9daa3e6 Merge pull request #25139 from atm-greg/Fix_11.0_bankentries_list_missing_hook
add missing hook printFieldListValue
2023-06-19 16:48:13 +02:00
atm-greg
e5193f16cc add printFieldListJoin 2023-06-19 16:09:34 +02:00
atm-greg
9abde6c057 add missing hook printFieldListValue 2023-06-19 14:26:49 +02:00
Laurent Destailleur
6aa8ba8935 Removed unexpected files 2023-03-16 09:29:10 +01:00
Laurent Destailleur
f782ac6654 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-11-22 22:03:47 +01:00
Laurent Destailleur
1e54e695b2 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-11-22 22:00:59 +01:00
Laurent Destailleur
f2eb3c1a55 Merge pull request #22919 from atm-maxime/11.0
Fix API right check
2022-11-22 21:40:12 +01:00
Laurent Destailleur
41a970c90f Merge pull request #22922 from ATM-Nicolas/fix_sql_request_parenthesis
FIX sql request parenthesis
2022-11-22 21:39:11 +01:00
ATM-Nicolas
3d9b2a1676 FIX : SQL request parenthesis 2022-11-22 15:32:37 +01:00
Maxime Kohlhaas
7be0e0da1c Fix API right check 2022-11-22 13:46:42 +01:00
Laurent Destailleur
cc1a3080d0 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-05-03 11:53:23 +02:00
Laurent Destailleur
b5f887b3e4 Fix DEBUGBAR_USE_LOG_FILE 2022-05-03 11:52:32 +02:00
Laurent Destailleur
a1534955a1 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-03-10 15:52:50 +01:00
Laurent Destailleur
79371f66b0 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2022-03-10 15:52:28 +01:00
Laurent Destailleur
4569cb82b2 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0 2022-03-10 15:52:04 +01:00
Laurent Destailleur
04d33f4594 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0 2022-03-10 15:51:42 +01:00
Laurent Destailleur
af6e95aa79 Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-03-10 15:49:51 +01:00
Laurent Destailleur
5d942c9d1a Fix infinit logs 2022-03-10 15:46:00 +01:00
Laurent Destailleur
7dfb369a98 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2022-01-07 15:48:23 +01:00
Laurent Destailleur
265aeb76e6 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0
Conflicts:
	htdocs/core/class/utils.class.php
	htdocs/expensereport/class/expensereport.class.php
2022-01-07 15:48:13 +01:00
Laurent Destailleur
5ee74d7c07 Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 10.0 2022-01-07 15:45:51 +01:00
Laurent Destailleur
1541e20870 Merge branch '8.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-01-07 15:43:28 +01:00
Laurent Destailleur
53709cf509 Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 8.0
Conflicts:
	htdocs/core/class/utils.class.php
2022-01-07 15:40:05 +01:00
Laurent Destailleur
10e32c056e FIX avoid infinite loop on dump with popen 2022-01-07 15:35:33 +01:00
Laurent Destailleur
5de6c193ff Merge pull request #19745 from daraelmin/patch-1
Fix #19723 - Belgium provinces incorrect mapping
2022-01-06 10:41:19 +01:00
daraelmin
1f6e9a1a9e Fix install - Belgium provinces incorrect mapping 2022-01-04 18:46:29 +01:00
Laurent Destailleur
0a72aed3d7 Fix missing space before union 2021-12-23 13:35:38 +01:00
Laurent Destailleur
ce8312c744 Merge pull request #19464 from atm-quentin/FIX_11_TAB_INVOICE
FIX : Urgent onglet contact inaccessible depuis une facture
2021-11-30 11:45:56 +01:00
Quentin VIAL-GOUTEYRON
632147ad88 object->id is always empty 2021-11-24 12:04:18 +01:00
Laurent Destailleur
9aa5c94612 Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into 11.0 2021-11-11 15:59:48 +01:00
Laurent Destailleur
ba724204a4 FIX Bad use of dol_concatdesc() 2021-11-11 15:50:32 +01:00
Laurent Destailleur
ff696e0dad Merge pull request #19236 from marc-dll/11.0_FIX_invoice_creation_blocked
FIX: URGENT: impossible to create an invoice
2021-10-31 14:03:11 +01:00
Laurent Destailleur
3dcd1aa05d Update info.php 2021-10-31 14:02:34 +01:00
Laurent Destailleur
8dfe4fe05f Update note.php 2021-10-31 14:02:14 +01:00
Laurent Destailleur
65d59405da Update document.php 2021-10-31 14:01:56 +01:00
Laurent Destailleur
0e2e8fe27f Update contact.php 2021-10-31 14:01:40 +01:00
Marc de Lima Lucio
eb8d7f92c3 FIX: invoice: inpossible to create an invoice because of very bad check + warnings when trying to print tabs for invoice with no ID 2021-10-28 15:26:40 +02:00
Laurent Destailleur
e1af439a6d Merge pull request #18931 from atm-florianm/FIX_11.0_consistent_UX_for_invoices_when_no_id_or_ref
FIX: consistent UX when calling a tab from the invoice card with empty ref/id
2021-10-17 13:52:30 +02:00
atm-florian
57052e2fba FIX PR#18931 Remove useless explicit call to dol_shutdown 2021-10-11 11:10:14 +02:00
atm-florian
2da16ade6c FIX: consistent UX when calling a tab from the invoice card with empty ref / id 2021-10-08 17:24:52 +02:00
Laurent Destailleur
cd09099409 Merge pull request #18563 from atm-maxime/patch-3
Fix supplier invoice pdf generation canelle
2021-09-01 13:37:50 +02:00
Maxime Kohlhaas
d09d036f06 Fix supplier invoice pdf generation canelle
Thirdparty wrongly fetched was causing errors on mass generation
2021-08-31 16:10:55 +02:00
31 changed files with 93 additions and 56 deletions

View File

@@ -495,6 +495,12 @@ $sql .= " ".MAIN_DB_PREFIX."bank as b";
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'company'";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid";
// Add fields from hooks
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListJoin', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= " WHERE b.fk_account = ba.rowid";
$sql .= " AND ba.entity IN (".getEntity('bank_account').")";
if ($search_account > 0) $sql .= " AND b.fk_account = ".$search_account;
@@ -1507,6 +1513,11 @@ if ($resql)
if (!$i) $totalarray['nbfield']++;
}
// Fields from hook
$parameters=array('arrayfields'=>$arrayfields, 'obj'=>$objp, 'i'=>$i, 'totalarray'=>&$totalarray);
$reshook=$hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp); // Note that $action and $objecttmpect may have been modified by hook
print $hookmanager->resPrint;
// Action edit/delete
print '<td class="nowraponall" align="center">';
// Transaction reconciliated or edit link

View File

@@ -2756,6 +2756,7 @@ if (empty($reshook))
* View
*/
$form = new Form($db);
$formother = new FormOther($db);
$formfile = new FormFile($db);
@@ -3669,6 +3670,15 @@ if ($action == 'create')
}
elseif ($id > 0 || !empty($ref))
{
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound");
echo ' <a href="javascript:history.go(-1)">'.$langs->trans('GoBack').'</div>';
llxFooter();
exit;
}
/*
* Show object in view mode
*/

View File

@@ -85,6 +85,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@@ -43,6 +43,14 @@ $ref = GETPOST("ref", 'alpha');
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$form = new Form($db);
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Info');

View File

@@ -64,6 +64,14 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
* View
*/
if (empty($object->id)) {
llxHeader();
$langs->load('errors');
echo '<div class="error">'.$langs->trans("ErrorRecordNotFound").'</div>';
llxFooter();
exit;
}
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Notes');
$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
llxHeader('', $title, $helpurl);

View File

@@ -418,7 +418,7 @@ if ($modecompta == 'CREANCES-DETTES')
// Quantity
print '<td class="right">';
print $qty[$key];
print price($qty[$key], 1, $langs, 0, 0);
print '</td>';
// Percent;

View File

@@ -469,7 +469,7 @@ class Translate
if (! $found && ! empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
// Overwrite translation with database read
$sql ="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where lang='".$db->escape($this->defaultlang)."' OR lang IS NULL";
$sql ="SELECT transkey, transvalue FROM ".MAIN_DB_PREFIX."overwrite_trans where (lang='".$db->escape($this->defaultlang)."' OR lang IS NULL)";
$sql.=" AND entity IN (0, ".getEntity('overwrite_trans').")";
$sql.=$db->order("lang", "DESC");
$resql=$db->query($sql);

View File

@@ -346,17 +346,19 @@ class Utils
{
$handlein = popen($fullcommandclear, 'r');
$i = 0;
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle, $read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok = 1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok = 1;
if ($handlein) {
while (!feof($handlein))
{
$i++; // output line number
$read = fgets($handlein);
// Exclude warning line we don't want
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
fwrite($handle, $read);
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) $ok = 1;
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) $ok = 1;
}
pclose($handlein);
}
pclose($handlein);
}
@@ -388,7 +390,7 @@ class Utils
if ($compression == 'none') fclose($handle);
if ($compression == 'gz') gzclose($handle);
if ($compression == 'bz') bzclose($handle);
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error
if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg) || preg_match('/^\/\*M?!999999/', $errormsg)) { // Start of file is ok, NOT an error
$errormsg = '';
}
else

View File

@@ -367,7 +367,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_propale['nb'];
print '</td><td class="right">';
print $product->stats_propale['qty'];
print price($product->stats_propale['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -385,7 +385,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_proposal_supplier['nb'];
print '</td><td class="right">';
print $product->stats_proposal_supplier['qty'];
print price($product->stats_proposal_supplier['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -403,7 +403,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande['nb'];
print '</td><td class="right">';
print $product->stats_commande['qty'];
print price($product->stats_commande['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -421,7 +421,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_commande_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_commande_fournisseur['qty'];
print price($product->stats_commande_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -439,7 +439,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture['nb'];
print '</td><td class="right">';
print $product->stats_facture['qty'];
print price($product->stats_facture['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -457,7 +457,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_facture_fournisseur['nb'];
print '</td><td class="right">';
print $product->stats_facture_fournisseur['qty'];
print price($product->stats_facture_fournisseur['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}
@@ -476,7 +476,7 @@ function show_stats_for_company($product, $socid)
print '</td><td class="right">';
print $product->stats_contrat['nb'];
print '</td><td class="right">';
print $product->stats_contrat['qty'];
print price($product->stats_contrat['qty'], 1, $langs, 0, 0);
print '</td>';
print '</tr>';
}

View File

@@ -1266,12 +1266,10 @@ class pdf_einstein extends ModelePDFCommandes
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))

View File

@@ -1631,12 +1631,10 @@ class pdf_crabe extends ModelePDFFactures
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))

View File

@@ -1478,12 +1478,10 @@ class pdf_azur extends ModelePDFPropales
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))

View File

@@ -1514,12 +1514,10 @@ class pdf_cyan extends ModelePDFPropales
if ($this->emetteur->logo)
{
$logodir = $conf->mycompany->dir_output;
if (! empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO))
{
if (!empty($conf->mycompany->multidir_output[$object->entity])) $logodir = $conf->mycompany->multidir_output[$object->entity];
if (empty($conf->global->MAIN_PDF_USE_LARGE_LOGO)) {
$logo = $logodir.'/logos/thumbs/'.$this->emetteur->logo_small;
}
else {
} else {
$logo = $logodir.'/logos/'.$this->emetteur->logo;
}
if (is_readable($logo))

View File

@@ -208,7 +208,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
global $user, $langs, $conf, $mysoc, $hookmanager, $nblines;
// Get source company
if (!is_object($object->thirdparty)) $object->fetch_thirdparty();
$object->fetch_thirdparty();
if (!is_object($object->thirdparty)) $object->thirdparty = $mysoc; // If fetch_thirdparty fails, object has no socid (specimen)
$this->emetteur = $object->thirdparty;
if (!$this->emetteur->country_code) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined
@@ -224,8 +224,6 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if ($conf->fournisseur->facture->dir_output)
{
$object->fetch_thirdparty();
$deja_regle = $object->getSommePaiement(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_credit_notes_included = $object->getSumCreditNotesUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);
$amount_deposits_included = $object->getSumDepositsUsed(($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? 1 : 0);

View File

@@ -268,11 +268,11 @@ class DataPolicy
{
if ($sendtocc)
{
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
}
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg .= dol_concatdesc($actionmsg, $message);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}
// Send mail
@@ -342,11 +342,11 @@ class DataPolicy
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
if ($message) {
if ($sendtocc) {
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
}
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg .= dol_concatdesc($actionmsg, $message);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
$actionmsg = dol_concatdesc($actionmsg, $message);
}

View File

@@ -72,7 +72,7 @@ class DolLogsCollector extends MessagesCollector
{
global $conf;
$uselogfile=$conf->global->DEBUGBAR_USE_LOGFILE;
$uselogfile=$conf->global->DEBUGBAR_USE_LOG_FILE;
if ($uselogfile)
{

View File

@@ -2236,7 +2236,7 @@ class ExpenseReport extends CommonObject
$sql = "SELECT DISTINCT ur.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."user_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
$sql .= " WHERE ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';
$sql .= "UNION";
$sql .= " UNION";
$sql .= " SELECT DISTINCT ugu.fk_user";
$sql .= " FROM ".MAIN_DB_PREFIX."usergroup_user as ugu, ".MAIN_DB_PREFIX."usergroup_rights as ur, ".MAIN_DB_PREFIX."rights_def as rd";
$sql .= " WHERE ugu.fk_usergroup = ur.fk_usergroup AND ur.fk_id = rd.id and rd.module = 'expensereport' AND rd.perms = 'approve'"; // Permission 'Approve';

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -158,10 +158,10 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'05','',1,'FLANDRE-OCCIDENTALE','Flandre-Occidentale');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'06','',1,'FLANDRE-ORIENTALE','Flandre-Orientale');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'07','',2,'HAINAUT','Hainaut');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'08','',2,'LIEGE','Liège');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'08','',2,'LIEGE','Liège');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'09','',1,'LIMBOURG','Limbourg');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'10','',2,'LUXEMBOURG','Luxembourg');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'11','',2,'NAMUR','Namur');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (202,'11','',2,'NAMUR','Namur');
-- Provinces Italy (id=3)
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AG',315,NULL,NULL,NULL,'AGRIGENTO');

View File

@@ -1048,7 +1048,7 @@ class Thirdparties extends DolibarrApi
{
global $db, $conf;
if (!DolibarrApiAccess::$user->rights->facture->lire) {
if (!DolibarrApiAccess::$user->rights->societe->lire) {
throw new RestException(401);
}
if (empty($id)) {