Skip to content

Commit

Permalink
Merge branch 'develop' into develop_fix_cancel_edit_line_dipatch
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Mar 23, 2024
2 parents 7521feb + 17131bb commit 193ba7a
Show file tree
Hide file tree
Showing 23 changed files with 1,913 additions and 1,358 deletions.
2 changes: 1 addition & 1 deletion COPYRIGHT
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jQuery jqueryFileTree 1.0.1 GPL and MIT License Yes
jQuery jquerytreeview 1.4.1 MIT License Yes JS library for filetree
jQuery TableDnD 0.6 GPL and MIT License Yes JS library plugin TableDnD (to reorder table rows)
jQuery Timepicker 1.1.0 GPL and MIT License Yes JS library Timepicker addon for Datepicker
jsGanttImproved 2.7.3 BSD License Yes JS library (to build Gantt reports)
jsGanttImproved 2.8.10 BSD License Yes JS library (to build Gantt reports)
SwaggerUI 2.2.10 GPL-2+ Yes JS library to offer the REST API explorer

Image libraries:
Expand Down
45 changes: 18 additions & 27 deletions dev/dolibarr_changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Replace:
d.items&&
With
d&&d.items&&


ESCPOS:
-------
Expand All @@ -55,8 +55,8 @@ NUSOAP:
* Line 1257 of file nusoap.php. Add:

libxml_disable_entity_loader(true); // Avoid load of external entities (security problem). Required only for libxml < 2.


* Line 4346 of file nusoap.php

$rev = array();
Expand Down Expand Up @@ -128,13 +128,13 @@ with
if (!@TCPDF_STATIC::file_exists($file)) {
// DOL CHANGE If we keep this, the image is not visible on pages after the first one.
//var_dump($file.' '.(!@TCPDF_STATIC::file_exists($file)));
//return false;
//return false;
$tfile = str_replace(' ', '%20', $file);
if (@TCPDF_STATIC::file_exists($tfile)) {
$file = $tfile;
}
}

* Replace in tcpdf.php:
if (($imgsrc[0] === '/') AND !empty($_SERVER['DOCUMENT_ROOT']) AND ($_SERVER['DOCUMENT_ROOT'] != '/')) {
with
Expand Down Expand Up @@ -174,7 +174,7 @@ with
imagesetpixel($imgalpha, $xpx, $ypx, $alpha);
into
imagesetpixel($imgalpha, $xpx, $ypx, (int) $alpha);

* Removed useless directories ("examples", "tools")

* Optionally, removed all fonts except
Expand Down Expand Up @@ -243,7 +243,7 @@ with:
with
foreach ($value[1] as $k => $v) {

* Fix by replacing
* Fix by replacing
if ($res[0] == PDF_TYPE_OBJECT)
with
if (isset($res[0]) && $res[0] == PDF_TYPE_OBJECT)
Expand All @@ -253,23 +253,16 @@ with
JSGANTT:
--------
* Replace in function JSGantt.taskLink
var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
window.open(pRef, 'newwin', 'height=' + vHeight + ',width=' + vWidth);
with
// LDR To open in same window
// @CHANGE DOLI To open in same window
//var OpenWindow=window.open(pRef, "newwin", "height="+vHeight+",width="+vWidth);
window.location.href=pRef

* Replace
vTmpDiv=this.newNode(vTmpCell, 'div', null, null, vTaskList[i].getResource());
with
var vTmpNode=this.newNode(vTmpCell, 'div', null, '');
vTmpNode=this.newNode(vTmpNode, 'a', null, '', vLangs[vLang]['moreinfo']);
vTmpNode.setAttribute('href',vTaskList[i].getLink());

* Replace '% Comp.' to have a smaller text column header
'comp':'% Comp.'
'comp': '%...'
with
'comp':'%'
'comp': '%'



Expand Down Expand Up @@ -307,19 +300,19 @@ RESTLER:
// @CHANGE LDR
if (!is_string($haystack)) return false;

* Replace
* Replace

$loaders = array_unique(static::$rogueLoaders);
with

with

$loaders = array_unique(static::$rogueLoaders, SORT_REGULAR);

* Replace CommentParser.php line 423
elseif (count($value) && is_numeric($value[0]))

with

elseif (count($value) && isset($value[0]) && is_numeric($value[0]))

* Add CommentParser.php line 406 & 407 to remove a warning on api request in php 8.1
Expand Down Expand Up @@ -417,5 +410,3 @@ Edit CSS to restore line removed between 4.0.5 and 4.0.6. It generates this bug:
.select2-hidden-accessible {
margin: -10000px !important; /* line to restore */
}


13 changes: 6 additions & 7 deletions dev/translation/dynamic_translation_keys.lst
Original file line number Diff line number Diff line change
Expand Up @@ -2650,9 +2650,7 @@ ProductsOrServicesTranslations
ProductsPipeServices
ProductsPricePerCustomer
ProfId10
ProfId10FR
ProfId10Short
ProfId10ShortFR
ProfId1ShortCM
ProfId1ShortFR
ProfId2ShortCM
Expand All @@ -2663,14 +2661,15 @@ ProfId4ShortCM
ProfId4ShortFR
ProfId5ShortCM
ProfId5ShortFR
ProfId6ShortCM
ProfId6ShortFR
ProfId1Short
ProfId2Short
ProfId3Short
ProfId4Short
ProfId5Short
ProfId6Short
ProfId7Short
ProfId7ShortFR
ProfId8Short
ProfId8ShortFR
ProfId9Short
ProfId9ShortFR
ProformaBill
ProjectCreatedByEmailCollector
ProjectHasNoCategory
Expand Down
2 changes: 1 addition & 1 deletion dev/translation/sanity_check_trans_missing_unused.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ if [ -s "${MISSING_AND_UNUSED_FILE}" ] ; then
echo "## :warning: Unused Translations may match ->trans(\$key.'SomeString')."
echo "## You can add such dynamic keys to $(basename "$DYNAMIC_KEYS_SRC_FILE")"
echo "## so that they are ignored for this report."
echo "## :warning: Unused Translations may be commented in the code"
echo "## :warning: Unused Translations may also be commented in the code"
echo "## You can add such 'disabled' keys to $(basename "$EXCLUDE_KEYS_SRC_FILE")"
echo "## so that they are ignored for this report."
echo
Expand Down
14 changes: 9 additions & 5 deletions htdocs/accountancy/admin/subaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

$search_subaccount = GETPOST('search_subaccount', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
$search_type = GETPOSTINT('search_type');
$search_type = GETPOST('search_type', 'intcomma');

// Security check
if ($user->socid > 0) {
Expand Down Expand Up @@ -128,6 +128,7 @@
// Page Header
$help_url = 'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilit&eacute;_en_Partie_Double#Configuration';
$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger');

llxHeader('', $title, $help_url);


Expand Down Expand Up @@ -300,14 +301,17 @@
if ($limit > 0 && $limit != $conf->liste_limit) {
$param .= '&limit='.((int) $limit);
}
if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss);
}
if ($search_subaccount) {
$param .= '&search_subaccount='.urlencode($search_subaccount);
}
if ($search_label) {
$param .= '&search_label='.urlencode($search_label);
}
if ($optioncss != '') {
$param .= '&optioncss='.urlencode($optioncss);
if ($search_type) {
$param .= '&search_type='.urlencode($search_type);
}

// List of mass actions available
Expand Down Expand Up @@ -373,7 +377,7 @@
print '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['subaccount']['checked'])) {
print_liste_field_titre($arrayfields['subaccount']['label'], $_SERVER["PHP_SELF"], "subaccount", "", $param, '', $sortfield, $sortorder);
Expand All @@ -391,7 +395,7 @@
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";

Expand Down
72 changes: 44 additions & 28 deletions htdocs/accountancy/bookkeeping/export.php
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@
setEventMessages('', $accountancyexport->errors, 'errors');
header('Location: '.$_SERVER['PHP_SELF']);
}
exit(); // download or show errors
exit(0); // download or show errors
}


Expand Down Expand Up @@ -845,7 +845,7 @@
);
}

$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").'...', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 420, 600);
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").'...', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 390, 700);
}

// Print form confirm
Expand Down Expand Up @@ -924,12 +924,15 @@
}

$moreforfilter = '';
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('AccountingCategory').': ';
$moreforfilter .= '<div class="nowrap inline-block">';
$moreforfilter .= $formaccounting->select_accounting_category($search_account_category, 'search_account_category', 1, 0, 0, 0);
$moreforfilter .= '</div>';
$moreforfilter .= '</div>';

if (!empty($search_account_category)) {
$moreforfilter .= '<div class="divsearchfield">';
$moreforfilter .= $langs->trans('AccountingCategory').': ';
$moreforfilter .= '<div class="nowrap inline-block">';
$moreforfilter .= $formaccounting->select_accounting_category($search_account_category, 'search_account_category', 1, 0, 0, 0);
$moreforfilter .= '</div>';
$moreforfilter .= '</div>';
}

$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
Expand All @@ -939,9 +942,11 @@
$moreforfilter = $hookmanager->resPrint;
}

print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</div>';
if ($moreforfilter) {
print '<div class="liste_titre liste_titre_bydiv centpercent">';
print $moreforfilter;
print '</div>';
}

print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">';
Expand Down Expand Up @@ -999,10 +1004,10 @@
if (getDolGlobalString('ACCOUNTANCY_COMBO_FOR_AUX')) {
print '<div class="nowrap">';
//print $langs->trans('From').' ';
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', $langs->trans('From'), 'maxwidth250', 'subledgeraccount');
print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', $langs->trans('From'), 'maxwidth150', 'subledgeraccount');
print '</div>';
print '<div class="nowrap">';
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', $langs->trans('to'), 'maxwidth250', 'subledgeraccount');
print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', $langs->trans('to'), 'maxwidth150', 'subledgeraccount');
print '</div>';
} else {
print '<input type="text" class="maxwidth75" name="search_accountancy_aux_code" value="'.dol_escape_htmltag($search_accountancy_aux_code).'">';
Expand Down Expand Up @@ -1257,6 +1262,7 @@

// Document ref
if (!empty($arrayfields['t.doc_ref']['checked'])) {
$documentlink = '';
if ($line->doc_type == 'customer_invoice') {
$langs->loadLangs(array('bills'));

Expand All @@ -1265,10 +1271,12 @@
$objectstatic->fetch($line->fk_doc);
//$modulepart = 'facture';

$filename = dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id;
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
if ($objectstatic->id > 0) {
$filename = dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id;
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
}
} elseif ($line->doc_type == 'supplier_invoice') {
$langs->loadLangs(array('bills'));

Expand All @@ -1277,10 +1285,12 @@
$objectstatic->fetch($line->fk_doc);
//$modulepart = 'invoice_supplier';

$filename = dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
$subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir);
if ($objectstatic->id > 0) {
$filename = dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
$subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref);
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir);
}
} elseif ($line->doc_type == 'expense_report') {
$langs->loadLangs(array('trips'));

Expand All @@ -1289,10 +1299,12 @@
$objectstatic->fetch($line->fk_doc);
//$modulepart = 'expensereport';

$filename = dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id;
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
if ($objectstatic->id > 0) {
$filename = dol_sanitizeFileName($line->doc_ref);
$filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref);
$urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id;
$documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
}
} elseif ($line->doc_type == 'bank') {
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$objectstatic = new AccountLine($db);
Expand All @@ -1304,9 +1316,13 @@
$labeltoshow = '';
$labeltoshowalt = '';
if ($line->doc_type == 'customer_invoice' || $line->doc_type == 'supplier_invoice' || $line->doc_type == 'expense_report') {
$labeltoshow .= $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
$labeltoshow .= $documentlink;
$labeltoshowalt .= $objectstatic->ref;
if ($objectstatic->id > 0) {
$labeltoshow .= $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1);
$labeltoshow .= $documentlink;
$labeltoshowalt .= $objectstatic->ref;
} else {
$labeltoshow = '<span class="opacitymedium">'.$langs->trans("Deleted").'</span>';
}
} elseif ($line->doc_type == 'bank') {
$labeltoshow .= $objectstatic->getNomUrl(1);
$labeltoshowalt .= $objectstatic->ref;
Expand Down
Loading

0 comments on commit 193ba7a

Please sign in to comment.