Compare commits

...

57 Commits
15.0.1 ... 12.0

Author SHA1 Message Date
Laurent Destailleur
cf57e7e88b Merge 2024-10-29 15:44:25 +01:00
Laurent Destailleur
a186e16568 Backport fix for mysql 8 export 2024-10-29 15:32:54 +01:00
Laurent Destailleur
52138372ce Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2024-09-29 22:27:54 +02:00
Laurent Destailleur
a27538f582 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2024-09-29 22:27:42 +02: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
644f365455 Merge remote-tracking branch 'origin/11.0' into 12.0 2024-09-26 18:47:12 +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
e2b5315e23 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2023-11-23 18:40:52 +01:00
Laurent Destailleur
2462daf1ed Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2023-11-05 19:36:01 +01:00
Laurent Destailleur
9c7381601f Backport or better module compatibility 2023-11-05 19:35:34 +01:00
Laurent Destailleur
35a25599e5 FIX Backport memory fix for fatal error when +100000 products 2023-11-05 19:28:04 +01:00
atm-lena
9bfeb5e424 Add Hook "printFieldListFrom" in supplier order list (#26376)
Co-authored-by: atm-lena <lena.papazian@atm-consulting.fr>
2023-10-26 17:13:36 +02:00
Laurent Destailleur
973a2ede97 Fix syntax error 2023-08-10 11:35:19 +02:00
Laurent Destailleur
d3fc152001 Merge 2023-08-10 10:46:44 +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
d10f277bba Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2023-06-19 19:13:54 +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
a52ae607ba Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2023-03-16 09:30:36 +01:00
Laurent Destailleur
6aa8ba8935 Removed unexpected files 2023-03-16 09:29:10 +01:00
Laurent Destailleur
5ad7894849 Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2022-11-22 22:05:43 +01:00
Laurent Destailleur
2c1571c514 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0 2022-11-22 22:05:33 +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
bb01ad7d9a Merge pull request #22850 from daraelmin/patch-4
FIx #18304 No adh create if error on public form
2022-11-15 13:12:02 +01:00
stickler-ci
c81c91755d Fixing style errors. 2022-11-15 10:55:09 +00:00
daraelmin
cd2b9538c1 FIx #18304 No adh create if error on public form
FIX #18304 - Member subscription confirmation email sent even if mandatory fields are missing
2022-11-15 11:51:20 +01:00
Laurent Destailleur
eeaa4f8205 Revert "doc"
This reverts commit 380cae761a.
2022-06-25 04:06:55 +02:00
Laurent Destailleur
380cae761a doc 2022-06-25 04:06:18 +02:00
Laurent Destailleur
192510316b Merge pull request #21013 from atm-greg/FIX_12.0_get_batch_only_for_same_fk_product
fix sql to avoid getting product_stock of another product with same batch
2022-05-24 21:23:02 +02:00
Laurent Destailleur
6f83c8c6f3 Update productbatch.class.php 2022-05-24 21:22:14 +02:00
atm-greg
8213756c37 fix sql to avoid getting product_stock of another product with same batch 2022-05-24 16:49:55 +02:00
Laurent Destailleur
a254412c61 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/debugbar/class/DataCollector/DolLogsCollector.php
2022-05-03 11:54:28 +02: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
694357d48e Merge pull request #19420 from marc-dll/12.0_FIX_project_activity_default_workingdays
FIX: project timesheets: assume Saturday and Sunday as default weekend days when working days conf is empty or badly formed
2022-04-14 23:23:12 +02:00
Laurent Destailleur
c4f80b4e71 Merge pull request #19424 from marc-dll/12.0_FIX_employee_tab_holiday_length
FIX: user employee tab: offset in open days messes up holiday length calculation
2022-04-14 22:59:20 +02:00
Laurent Destailleur
ece9f3037a Merge pull request #19788 from OPEN-DSI/v12-fix-user-card-modify-transverse-rights
FIX user actions rights when multi-company transverse mode is enabled
2022-04-02 18:15:50 +02:00
Laurent Destailleur
8dd44246b0 Merge pull request #20348 from daraelmin/daraelmin-patch-5
Fix #20263 Accountancy setup displayed with right
2022-03-29 14:47:57 +02:00
Laurent Destailleur
76470c9548 Merge pull request #20297 from aspangaro/12p23
FIX #20279 Accountancy - PostGreSQL - Error on mass update lines already binded
2022-03-24 20:30:01 +01:00
stickler-ci
19be5f662d Fixing style errors. 2022-03-14 08:25:15 +00:00
daraelmin
3eebbc0b14 Fix #20263 Accountancy setup displayed with right
Fix #20263 Accountancy setup is displayed only for user with rights->accounting->chartofaccount
2022-03-14 09:24:26 +01:00
Alexandre SPANGARO
87b187bded FIX #20279 Accountancy - PostGreSQL - Error on mass update lines already binded 2022-03-08 03:43:40 +01:00
lvessiller
400f6b244b FIX user actions rights when mulit-company transverse mode is enabled 2022-01-11 17:29:02 +01:00
Marc de Lima Lucio
1129222064 FIX: user employee tab: offset in open days messes up holiday length calculation 2021-11-19 15:59:34 +01:00
Marc de Lima Lucio
7cb657c991 FIX: project timesheets: assume Saturday and Sunday are default weekend days when working days conf is empty or badly formed 2021-11-19 14:49:11 +01:00
35 changed files with 173 additions and 124 deletions

View File

@@ -121,9 +121,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
{
$db->begin();
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as l";
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet";
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';
dol_syslog('accountancy/customer/lines.php::changeaccount sql= '.$sql1);
$resql1 = $db->query($sql1);

View File

@@ -93,87 +93,88 @@ if ($conf->accounting->enabled)
print '<div class="'.($helpisexpanded ? '' : 'hideobject').'" id="idfaq">'; // hideobject is to start hidden
print "<br>\n";
print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
print "<br>\n"; print "<br>\n";
if (!empty($user->rights->accounting->chartofaccount)){
print "<br>\n"; print "<br>\n";
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
print '<hr>';
print "<br>\n";
print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
print '<hr>';
print "<br>\n";
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong></a>');
print "<br>\n";
// STEPS
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong></a>');
print "<br>\n";
print "<br>\n";
print $langs->trans("AccountancyAreaDescActionOnceBis");
print "<br>\n";
print "<br>\n";
print "<br>\n";
print $langs->trans("AccountancyAreaDescActionOnceBis");
print "<br>\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong></a>');
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong></a>')."\n";
print "<br>\n";
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong></a>')."\n";
print "<br>\n";
$step++;
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong></a>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
if (!empty($conf->tax->enabled))
{
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
$step++;
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong></a>';
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
print "<br>\n";
if (!empty($conf->tax->enabled))
{
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong></a>';
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
print "<br>\n";
}
/*if (! empty($conf->salaries->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
// htdocs/admin/salaries.php
print "<br>\n";
print "<br>\n";
}*/
if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>');
print "<br>\n";
}
/*
if (! empty($conf->loan->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->adherents->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong></a>');
print "<br>\n";
print '<br>';
}
/*if (! empty($conf->salaries->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
// htdocs/admin/salaries.php
print "<br>\n";
print "<br>\n";
}*/
if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong></a>');
print "<br>\n";
}
/*
if (! empty($conf->loan->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->don->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}
if (! empty($conf->adherents->enabled))
{
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
print "<br>\n";
}*/
$step++;
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong></a>');
print "<br>\n";
print '<br>';
// Step A - E

View File

@@ -123,9 +123,9 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
{
$db->begin();
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det as l";
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';
dol_syslog('accountancy/supplier/lines.php::changeaccount sql= '.$sql1);
$resql1 = $db->query($sql1);

View File

@@ -494,6 +494,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;
@@ -1514,6 +1520,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

@@ -419,7 +419,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

@@ -468,10 +468,9 @@ class Translate
}
}
if (!$found && !empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION))
{
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

@@ -390,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

@@ -64,6 +64,17 @@ function getDolGlobalInt($key)
return (int) (empty($conf->global->$key) ? 0 : $conf->global->$key);
}
/**
* Is Dolibarr module enabled
* @param string $module module name to check
* @return int
*/
function isModEnabled($module)
{
global $conf;
return !empty($conf->$module->enabled);
}
/**
* Return a DoliDB instance (database handler).
*

View File

@@ -388,7 +388,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>';
}
@@ -406,7 +406,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>';
}
@@ -424,7 +424,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>';
}
@@ -442,7 +442,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>';
}
@@ -460,7 +460,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>';
}
@@ -478,7 +478,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>';
}
@@ -497,7 +497,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

@@ -1270,11 +1270,9 @@ class pdf_einstein extends ModelePDFCommandes
{
$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->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

@@ -1653,11 +1653,9 @@ class pdf_crabe extends ModelePDFFactures
{
$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->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

@@ -1482,11 +1482,9 @@ class pdf_azur extends ModelePDFPropales
{
$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->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

@@ -1556,11 +1556,9 @@ class pdf_cyan extends ModelePDFPropales
{
$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->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

@@ -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

@@ -531,6 +531,9 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON cf.fk_user_author = u.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = cf.fk_projet";
// We'll need this table joined to the select in order to filter by sale
if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sql .= ' WHERE cf.fk_soc = s.rowid';
$sql .= ' AND cf.entity IN ('.getEntity('supplier_order').')';
if ($socid > 0) $sql .= " AND s.rowid = ".$socid;

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

@@ -531,11 +531,11 @@ class Productbatch extends CommonObject
$sql .= " FROM ".MAIN_DB_PREFIX."product_lot as pl";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = pl.fk_product";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_batch AS pb ON pl.batch = pb.batch";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock AS ps ON ps.rowid = pb.fk_product_stock";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock AS ps ON ps.rowid = pb.fk_product_stock AND ps.fk_product = ".((int) $fk_product);
$sql .= " WHERE p.entity IN (".getEntity('product').")";
$sql .= " AND pl.fk_product = ".$fk_product;
$sql .= " AND pl.fk_product = ".((int) $fk_product);
if ($fk_warehouse > 0) {
$sql .= " AND ps.fk_entrepot = ".$fk_warehouse;
$sql .= " AND ps.fk_entrepot = ".((int) $fk_warehouse);
}
if ($qty_min !== null) {
$sql .= " AND pb.qty > ".$qty_min;

View File

@@ -328,10 +328,14 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) {
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook
$sql .= $hookmanager->resPrint;
$sqlfields = $sql; // $sql fields to remove for count total
$sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields as ef on (p.rowid = ef.fk_object)";
if (!empty($searchCategoryProductList) || !empty($catid)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; // We'll need this table joined to the select in order to filter by categ
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
$linktopfp = " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
$sql .= $linktopfp;
// multilang
if (!empty($conf->global->MAIN_MULTILANGS)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_lang as pl ON pl.fk_product = p.rowid AND pl.lang = '".$langs->getDefaultLang()."'";
@@ -426,8 +430,24 @@ $sql .= $db->order($sortfield, $sortorder);
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
/* The fast and low memory method to get and count full list converts the sql into a sql count */
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
$sqlforcount = preg_replace('/'.preg_quote($linktopfp, '/').'/', '', $sqlforcount);
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
$resql = $db->query($sqlforcount);
if ($resql) {
$objforcount = $db->fetch_object($resql);
$nbtotalofrecords = $objforcount->nbtotalofrecords;
} else {
dol_print_error($db);
}
/*
$result = $db->query($sql);
$nbtotalofrecords = $db->num_rows($result);
*/
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
{
$page = 0;

View File

@@ -620,6 +620,11 @@ $restrictviewformytask = ((!isset($conf->global->PROJECT_TIME_SHOW_TASK_NOT_ASSI
// Get if user is available or not for each day
$isavailable = array();
// Assume from Monday to Friday if conf empty or badly formed
$numstartworkingday = 1;
$numendworkingday = 5;
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
{
$tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);

View File

@@ -521,6 +521,11 @@ $startday = dol_mktime(12, 0, 0, $startdayarray['first_month'], $startdayarray['
// Get if user is available or not for each day
$isavailable = array();
// Assume from Monday to Friday if conf empty or badly formed
$numstartworkingday = 1;
$numendworkingday = 5;
if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
{
$tmparray = explode('-', $conf->global->MAIN_DEFAULT_WORKING_DAYS);
@@ -530,7 +535,6 @@ if (!empty($conf->global->MAIN_DEFAULT_WORKING_DAYS))
$numendworkingday = $tmparray[1];
}
}
for ($idw = 0; $idw < 7; $idw++)
{
$dayinloopfromfirstdaytoshow = dol_time_plus_duree($firstdaytoshow, $idw, 'd'); // $firstdaytoshow is a date with hours = 0

View File

@@ -279,7 +279,10 @@ if ($action == 'add')
$ret = $extrafields->setOptionalsFromPost(null, $adh);
if ($ret < 0) $error++;
$result = $adh->create($user);
if (empty($error)) {
$result = $adh->create($user);
}
if ($result > 0)
{
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';

View File

@@ -1062,7 +1062,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)) {

View File

@@ -327,7 +327,7 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
$holiday->id = $objp->rowid;
$holiday->ref = $objp->rowid;
$holiday->fk_type = $objp->fk_type;
$nbopenedday = num_open_day($db->jdate($objp->date_debut), $db->jdate($objp->date_fin), 0, 1, $objp->halfday);
$nbopenedday = num_open_day($db->jdate($objp->date_debut, 'gmt'), $db->jdate($objp->date_fin, 'gmt'), 0, 1, $objp->halfday);
print $holiday->getNomUrl(1);
print '</td><td class="right" width="80px">'.dol_print_date($db->jdate($objp->date_debut), 'day')."</td>\n";

View File

@@ -1905,7 +1905,7 @@ else
}
}
if ($caneditfield && (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
if ($caneditfield && (empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
{
if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED))
{
@@ -1917,7 +1917,7 @@ else
}
}
elseif ($caneditpassword && !$object->ldap_sid &&
(empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
(empty($conf->multicompany->enabled) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans("EditPassword").'</a></div>';
}
@@ -1930,7 +1930,7 @@ else
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("ReinitPassword").'</a></div>';
}
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=password">'.$langs->trans("ReinitPassword").'</a></div>';
}
@@ -1940,7 +1940,7 @@ else
print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("UserDisabled")).'">'.$langs->trans("SendNewPassword").'</a></div>';
}
elseif (($user->id != $id && $caneditpassword) && $object->login && !$object->ldap_sid &&
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
{
if ($object->email) print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=passwordsend">'.$langs->trans("SendNewPassword").'</a></div>';
else print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans("SendNewPassword").'</a></div>';
@@ -1949,13 +1949,13 @@ else
// Enable user
if ($user->id <> $id && $candisableuser && $object->statut == 0 &&
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
{
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=enable">'.$langs->trans("Reactivate").'</a></div>';
}
// Disable user
if ($user->id <> $id && $candisableuser && $object->statut == 1 &&
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
{
print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER['PHP_SELF'].'?action=disable&amp;id='.$object->id.'">'.$langs->trans("DisableUser").'</a></div>';
}
@@ -1968,7 +1968,7 @@ else
}
// Delete
if ($user->id <> $id && $candisableuser &&
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $conf->entity == 1)))
((empty($conf->multicompany->enabled) && $object->entity == $user->entity) || !$user->entity || ($object->entity == $conf->entity) || ($conf->global->MULTICOMPANY_TRANSVERSE_MODE && $object->entity == 1)))
{
if ($user->admin || !$object->admin) // If user edited is admin, delete is possible on for an admin
{