Skip to content

Commit

Permalink
Merge remote-tracking branch 'Dolibarr/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
inoveaconseil committed Nov 7, 2019
2 parents 2fb3440 + 34beca0 commit cb8e041
Show file tree
Hide file tree
Showing 732 changed files with 12,626 additions and 10,496 deletions.
4 changes: 4 additions & 0 deletions .stickler.yml
Expand Up @@ -8,3 +8,7 @@ linters:

fixers:
enable: true

files:
ignore:
- 'htdocs/includes/*'
8 changes: 4 additions & 4 deletions COPYRIGHT
Expand Up @@ -2,7 +2,7 @@
License
-------

Dolibarr is released under the terms of the GNU General Public License as
Dolibarr is released under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 3 of the License,
or (at your option) any later version (GPL-3+).
More information: https://www.gnu.org/licenses/gpl-3.0.txt
Expand All @@ -15,13 +15,13 @@ PHP libraries:
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
CKEditor 4.12.1 LGPL-2.1+ Yes Editor WYSIWYG
EvalMath 1.0 BSD Yes Safe math expressions evaluation
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
Escpos-php 2.2 MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
Mobiledetect 2.8.33 MIT License Yes Detect mobile devices browsers
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency
ParseDown 1.6 MIT License Yes Markdown parser
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
Expand All @@ -37,7 +37,7 @@ TCPDF 6.3.2 LGPL-3+ Yes
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement

JS libraries:
Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea.
Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea.
jQuery 3.4.1 MIT License Yes JS library
jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI
jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect
Expand Down
2 changes: 1 addition & 1 deletion ChangeLog
Expand Up @@ -24,7 +24,7 @@ Following changes may create regressions for some external modules, but were nec
* Removed function dol_micro_time. Use native PHP microtime instead.
* The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE.
* The constant INVOICE_SHOW_POS_IN_EXPORT has been renamed into INVOICE_SHOW_POS.
* If your logo was visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible agin in menu.
* If your logo is no more visible on the menu bar, you must upload a new logo into 'Home-Setup-Company/Organization' to have it visible again.
* All properties 'libstatut', 'labelstatut', 'labelstatus' were renamed into 'labelStatus'.
* All properties 'labelstatusshort' and 'labelstatut_short' were renamed into 'labelStatusShort'.
* All properties 'type_libelle' were renamed into 'type_label'.
Expand Down
4 changes: 2 additions & 2 deletions build/generate_filelist_xml.php
Expand Up @@ -164,7 +164,7 @@
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}
fputs($fp, ' </dir>'."\n");
Expand Down Expand Up @@ -207,7 +207,7 @@
if (filetype($file)=="file") {
$md5=md5_file($file);
$checksumconcat[]=$md5;
fputs($fp, ' <md5file name="'.basename($file).'">'.$md5.'</md5file>'."\n");
fputs($fp, ' <md5file name="'.basename($file).'" size="'.filesize($file).'">'.$md5.'</md5file>'."\n");
}
}
fputs($fp, ' </dir>'."\n");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/account.php
Expand Up @@ -138,7 +138,7 @@

if ($result > 0)
{
setEventMessages($langs->trans("ChartLoaded"), null);
setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs');
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/accountmodel.php
Expand Up @@ -456,7 +456,7 @@
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';

print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';

// Form to add a new line
if ($tabname[$id])
Expand Down
6 changes: 3 additions & 3 deletions htdocs/accountancy/admin/card.php
Expand Up @@ -220,7 +220,7 @@

dol_fiche_head();

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

// Chart of account
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("Chartofaccounts") . '</span></td>';
Expand Down Expand Up @@ -291,7 +291,7 @@
print '<input type="hidden" name="id" value="' . $id . '">';
print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

// Account number
print '<tr><td class="titlefieldcreate"><span class="fieldrequired">' . $langs->trans("AccountNumber") . '</span></td>';
Expand Down Expand Up @@ -348,7 +348,7 @@
print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>';

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

// Label
print '<tr><td class="titlefield">' . $langs->trans("Label") . '</td>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/categories.php
Expand Up @@ -104,7 +104,7 @@

dol_fiche_head();

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

// Select the category
print '<tr><td class="titlefield">' . $langs->trans("AccountingCategory") . '</td>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/categories_list.php
Expand Up @@ -449,7 +449,7 @@
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from', 'alpha')).'">';

print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';

// Form to add a new line
if ($tabname[$id])
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/closure.php
Expand Up @@ -96,7 +96,7 @@
print '<input type="hidden" name="action" value="update">';

// Define main accounts for closure
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';

foreach ($list_account_main as $key) {
print '<tr class="oddeven value">';
Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/admin/defaultaccounts.php
Expand Up @@ -140,7 +140,7 @@

// Define main accounts for thirdparty

print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';

foreach ($list_account_main as $key) {
print '<tr class="oddeven value">';
Expand All @@ -167,7 +167,7 @@

// Define default accounts

print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';

foreach ($list_account as $key) {
print '<tr class="oddeven value">';
Expand Down
6 changes: 3 additions & 3 deletions htdocs/accountancy/admin/export.php
Expand Up @@ -195,7 +195,7 @@
* Main Options
*/

print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="3">' . $langs->trans('Options') . '</td>';
print "</tr>\n";
Expand Down Expand Up @@ -223,7 +223,7 @@
/*
* Export model
*/
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';

print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans("Modelcsv") . '</td>';
Expand Down Expand Up @@ -254,7 +254,7 @@

$num2 = count($model_option);
if ($num2) {
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
print "</tr>\n";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/fiscalyear.php
Expand Up @@ -120,7 +120,7 @@

// Load attribute_label
print '<div class="div-table-responsive">';
print '<table class="tagtable liste" width="100%">';
print '<table class="tagtable liste centpercent">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans("Ref") . '</td>';
print '<td>' . $langs->trans("Label") . '</td>';
Expand Down
6 changes: 3 additions & 3 deletions htdocs/accountancy/admin/fiscalyear_card.php
Expand Up @@ -163,7 +163,7 @@

dol_fiche_head();

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

// Label
print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans("Label") . '</td><td><input name="label" size="32" value="' . GETPOST('label', 'alpha') . '"></td></tr>';
Expand Down Expand Up @@ -211,7 +211,7 @@
print '<input type="hidden" name="action" value="update">';
print '<input type="hidden" name="id" value="' . $id . '">';

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

// Ref
print "<tr>";
Expand Down Expand Up @@ -261,7 +261,7 @@

dol_fiche_head($head, 'card', $langs->trans("Fiscalyear"), 0, 'cron');

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

$linkback = '<a href="' . DOL_URL_ROOT . '/accountancy/admin/fiscalyear.php">' . $langs->trans("BackToList") . '</a>';

Expand Down
4 changes: 2 additions & 2 deletions htdocs/accountancy/admin/index.php
Expand Up @@ -172,7 +172,7 @@

// Default mode for calculating turnover (parameter ACCOUNTING_MODE)
/*
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
Expand Down Expand Up @@ -202,7 +202,7 @@

// Others params

print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td colspan="2">' . $langs->trans('OtherOptions') . '</td>';
print "</tr>\n";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/journals_list.php
Expand Up @@ -412,7 +412,7 @@
print '<input type="hidden" name="from" value="'.dol_escape_htmltag(GETPOST('from', 'alpha')).'">';

print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';

// Form to add a new line
if ($tabname[$id])
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/admin/productaccount.php
Expand Up @@ -325,7 +325,7 @@
print '<br>';

// Select mode
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>' . $langs->trans('Options') . '</td><td>' . $langs->trans('Description') . '</td>';
print "</tr>\n";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/balancebymonth.php
Expand Up @@ -70,7 +70,7 @@

$y = $year_current;

print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td width=150>' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i++)
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/card.php
Expand Up @@ -354,7 +354,7 @@

dol_fiche_head();

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

/*print '<tr>';
print '<td class="titlefieldcreate fieldrequired">' . $langs->trans("NumPiece") . '</td>';
Expand Down
32 changes: 5 additions & 27 deletions htdocs/accountancy/bookkeeping/list.php
Expand Up @@ -922,17 +922,17 @@
{
print '<td class="nowrap right">' . ($line->debit ? price($line->debit) : ''). '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totaldebitfield']=$totalarray['nbfield'];
$totalarray['totaldebit'] += $line->debit;
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totaldebit';
$totalarray['val']['totaldebit'] += $line->debit;
}

// Amount credit
if (! empty($arrayfields['t.credit']['checked']))
{
print '<td class="nowrap right">' . ($line->credit ? price($line->credit) : '') . '</td>';
if (! $i) $totalarray['nbfield']++;
if (! $i) $totalarray['totalcreditfield']=$totalarray['nbfield'];
$totalarray['totalcredit'] += $line->credit;
if (! $i) $totalarray['pos'][$totalarray['nbfield']]='totalcredit';
$totalarray['val']['totalcredit'] += $line->credit;
}

// Lettering code
Expand Down Expand Up @@ -998,29 +998,7 @@
}

// Show total line
if (isset($totalarray['totaldebitfield']) || isset($totalarray['totalcreditfield']))
{
$i=0;
print '<tr class="liste_total">';
while ($i < $totalarray['nbfield'])
{
$i++;
if ($i == 1)
{
if ($num < $limit && empty($offset)) print '<td class="left">'.$langs->trans("Total").'</td>';
else print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
}
elseif ($totalarray['totaldebitfield'] == $i) print '<td class="nowrap right">'.price($totalarray['totaldebit']).'</td>';
elseif ($totalarray['totalcreditfield'] == $i) print '<td class="nowrap right">'.price($totalarray['totalcredit']).'</td>';
else print '<td></td>';
}
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

print '</tr>';
}

include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';


print "</table>";
Expand Down
Expand Up @@ -197,14 +197,15 @@

$param="&socid=".$socid;
print '<form name="add" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';

$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';

print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit);

print '<div class="div-table-responsive-no-min">';
print '<table class="liste" width="100%">'."\n";
print '<table class="liste centpercent">'."\n";

/*
print '<tr class="liste_titre">';
Expand Down
Expand Up @@ -195,14 +195,15 @@

$param="&socid=".$socid;
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'?socid=' . $object->id . '" method="POST">';
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
print '<input type="hidden" name="socid" value="' . $object->id . '">';

$letteringbutton = '<a class="divButAction"><span class="valignmiddle"><input class="butAction" type="submit" value="lettering" name="lettering" id="lettering"></span></a>';

print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, $letteringbutton, '', $limit);

print '<div class="div-table-responsive-no-min">';
print '<table class="liste" width="100%">'."\n";
print '<table class="liste centpercent">'."\n";

/*
print '<tr class="liste_titre">';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/class/accountingaccount.class.php
Expand Up @@ -154,7 +154,7 @@ public function __construct($db)
* @param int $rowid Id
* @param string $account_number Account number
* @param int|boolean $limittocurrentchart 1 or true=Load record only if it is into current active char of account
* @param string $limittoachartaccount 'ABC'=Load record only if it is into chart account with code 'ABC'.
* @param string $limittoachartaccount 'ABC'=Load record only if it is into chart account with code 'ABC' (better and faster than previous parameter if you have chart of account code).
* @return int <0 if KO, 0 if not found, Id of record if OK and found
*/
public function fetch($rowid = null, $account_number = null, $limittocurrentchart = 0, $limittoachartaccount = '')
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/closure/index.php
Expand Up @@ -86,7 +86,7 @@
print_barre_liste($langs->trans("OverviewOfMovementsNotValidated"), '', '', '', '', '', '', -1, '', '', 0, $buttonbind, '', 0, 1, 1);

print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
for($i = 1; $i <= 12; $i ++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
if ($j > 12) $j-=12;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/closure/validate.php
Expand Up @@ -106,7 +106,7 @@
print_barre_liste($langs->trans("SelectMonthAndValidate"), '', '', '', '', '', '', -1, '', '', 0, '', 'class="right"', 0, 1, 1);

print '<div class="div-table-responsive-no-min">';
print '<table class="noborder" width="100%">';
print '<table class="noborder centpercent">';
print '<tr class="oddeven">';
for($i = 1; $i <= 12; $i ++) {
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START?$conf->global->SOCIETE_FISCAL_MONTH_START:1) - 1;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/customer/card.php
Expand Up @@ -123,7 +123,7 @@

dol_fiche_head();

print '<table class="border" width="100%">';
print '<table class="border centpercent">';

// Ref facture
print '<tr><td>' . $langs->trans("Invoice") . '</td>';
Expand Down

0 comments on commit cb8e041

Please sign in to comment.