Skip to content

Commit

Permalink
Merge branch '6.0' of https://github.com/Dolibarr/dolibarr into 6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
philippe-opendsi committed Nov 23, 2017
2 parents 26e3593 + 1e4844f commit 2f2b063
Show file tree
Hide file tree
Showing 93 changed files with 590 additions and 420 deletions.
46 changes: 43 additions & 3 deletions ChangeLog
Expand Up @@ -3,8 +3,33 @@ English Dolibarr ChangeLog
--------------------------------------------------------------


***** ChangeLog for 6.0.2 compared to 6.0.1 *****
***** ChangeLog for 6.0.3 compared to 6.0.2 *****
FIX: #7211 Update qty dispatched on qty change
FIX: #7458
FIX: #7593
FIX: #7616
FIX: #7619
FIX: #7626
FIX: #7648
FIX: #7675
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
FIX: API to get object does not return data of linked objects
FIX: Bad localtax apply
FIX: Bad ressource list in popup in gantt view
FIX: bankentries search conciliated if val 0
FIX: hook formObjectOptions() must use $expe and not $object
FIX: make of link to other object during creation
FIX: Missing function getLinesArray
FIX: old batch not shown in multi shipping
FIX: paid supplier invoices are shown as abandoned
FIX: selection of thirdparty was lost on stats page of invoices
FIX: sql syntax error because of old field accountancy_journal
FIX: Stats on invoices show nothing
FIX: substitution in ODT of thirdparties documents
FIX: wrong key in selectarray
FIX: wrong personnal project time spent

***** ChangeLog for 6.0.2 compared to 6.0.1 *****
FIX: #7148
FIX: #7288
FIX: #7366 renaming table with pgsql
Expand Down Expand Up @@ -38,7 +63,6 @@ FIX: wrong basePath in the swagger view
FIX: Implementation of a Luracast recommandation for the REST api server

***** ChangeLog for 6.0.1 compared to 6.0.* *****

FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
FIX: #7325 Default VAT rate when editing template invoices is 0%
FIX: #7330
Expand Down Expand Up @@ -80,7 +104,6 @@ FIX: CVE-2017-9840, CVE-2017-14238, CVE-2017-14239, CVE-2017-14240, CVE-2017-142
CVE-2017-14242

***** ChangeLog for 6.0.0 compared to 5.0.* *****

NEW: Add experimental BlockeLog module (to log business events in a non reversible log file).
NEW: Add a payment module for Stripe.
NEW: Add module "Product variant" (like red, blue for the product shoes)
Expand Down Expand Up @@ -229,6 +252,23 @@ Following changes may create regression for some external modules, but were nece
content by doing a print into function, sometimes by returning content into "resprint". This has been fixed to follow
hook specifications so you must return output into "resprint".


***** ChangeLog for 5.0.7 compared to 5.0.6 *****
FIX: #7000 Dashboard link for late pending payment supplier invoices do not work
FIX: #7148
FIX: #7325 Default VAT rate when editing template invoices is 0%
FIX: #7366 renaming table with pgsql
FIX: #7391
FIX: #7510 Bug: extrafield content disappear when generate pdf within intervention
FIX: Agenda events are not exported in the ICAL, VCAL if begin exactly with the same $datestart
FIX: Bad link to unpayed suppliers invoices
FIX: bankentries search conciliated if val 0
FIX: multicompany better accuracy in rounding and with revenue stamp.
FIX: PDF output was sharing 2 different currencies in same total
FIX: Upgrade missing on field
FIX: wrong key in selectarray
FIX: wrong personnal project time spent

***** ChangeLog for 5.0.6 compared to 5.0.5 *****
FIX: Removed a bad symbolic link into custom directory.
FIX: Renaming a resource ref rename also the directory of attached files.
Expand Down
2 changes: 1 addition & 1 deletion build/exe/doliwamp/doliwamp.iss
Expand Up @@ -353,7 +353,7 @@ begin
begin
// TODO Copy file or ask to install package ?
//CustomMessage('YouWillInstallDoliWamp')+#13#13
MsgBox('The package vcredist_x86.exe must have been installed first. It seems it is not. Please install it first from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=30679">http://www.microsoft.com/en-us/download/details.aspx?id=30679</a> then restart DoliWamp installation/upgrade.',mbInformation,MB_OK);
MsgBox('The Visual C++ Redistributable package should be installed, it seems it is not. Please install the 32-bit version from http://www.microsoft.com/en-us/download/details.aspx?id=30679, then restart the DoliWAMP installation/upgrade.',mbInformation,MB_OK);
end;
// Pb seems similar with msvcp110.dll
//vcredist_x64.exe
Expand Down
4 changes: 4 additions & 0 deletions build/makepack-dolibarr.pl
Expand Up @@ -571,6 +571,7 @@
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/.gitattributes`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Classes/license.md`;
Expand All @@ -579,6 +580,7 @@
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/Examples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/unitTests`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/phpoffice/phpexcel/license.md`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`;
Expand All @@ -590,6 +592,8 @@
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`;
$ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`;


print "Remove subdir of custom dir\n";
print "find $BUILDROOT/$PROJECT/htdocs/custom/* -type d -exec rm -fr {} \\;\n";
Expand Down
2 changes: 1 addition & 1 deletion dev/dolibarr_changes.txt
Expand Up @@ -99,7 +99,7 @@ JQUERYFILETREE:
RESTLER:
--------

* Add 2 lines into function
* Add 2 lines into file AutoLoader.php to complete function
private function alias($className, $currentClass)
{
...
Expand Down
2 changes: 1 addition & 1 deletion htdocs/accountancy/bookkeeping/card.php
Expand Up @@ -631,7 +631,7 @@
print "</tr>\n";
}

if ($total_debit != $total_credit)
if (price2num($total_debit) != price2num($total_credit))
{
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings');
}
Expand Down
52 changes: 35 additions & 17 deletions htdocs/accountancy/customer/list.php
Expand Up @@ -85,6 +85,9 @@
if (! $user->rights->accounting->bind->write)
accessforbidden();

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('accountancycustomerlist'));

$formaccounting = new FormAccounting($db);
$accounting = new AccountingAccount($db);
$aarowid_s = $accounting->fetch('', $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT, 1);
Expand All @@ -98,26 +101,33 @@
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }

// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

if (empty($reshook))
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
}

// Mass actions
$objectclass='AccountingAccount';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}

// Mass actions
$objectclass='Skeleton';
$objectlabel='Skeleton';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';

if ($massaction == 'ventil') {
$msg='';
Expand Down Expand Up @@ -182,6 +192,9 @@
$sql .= " l.rowid, l.fk_product, l.description, l.total_ht, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_sell as code_sell, p.tva_tx as tva_tx_prod,";
$sql .= " aa.rowid as aarowid";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql .= " FROM " . MAIN_DB_PREFIX . "facture as f";
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "facturedet as l ON f.rowid = l.fk_facture";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
Expand Down Expand Up @@ -223,6 +236,11 @@
}
$sql .= " AND f.entity IN (" . getEntity('facture', 0) . ")"; // We don't share object for accountancy

// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;

$sql .= $db->order($sortfield, $sortorder);

// Count total nb of records
Expand Down
53 changes: 35 additions & 18 deletions htdocs/accountancy/supplier/list.php
Expand Up @@ -85,6 +85,9 @@
if (! $user->rights->accounting->bind->write)
accessforbidden();

// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('accountancysupplierlist'));

$formaccounting = new FormAccounting($db);
$accounting = new AccountingAccount($db);
// TODO: we should need to check if result is a really exist accountaccount rowid.....
Expand All @@ -99,26 +102,32 @@
if (GETPOST('cancel')) { $action='list'; $massaction=''; }
if (! GETPOST('confirmmassaction') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction=''; }

// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
$parameters=array();
$reshook=$hookmanager->executeHooks('doActions',$parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');

if (empty($reshook))
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
}
// Purge search criteria
if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x','alpha') || GETPOST('button_removefilter','alpha')) // All test are required to be compatible with all browsers
{
$search_lineid = '';
$search_ref = '';
$search_invoice = '';
$search_label = '';
$search_desc = '';
$search_amount = '';
$search_account = '';
$search_vat = '';
}

// Mass actions
$objectclass='Skeleton';
$objectlabel='Skeleton';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
// Mass actions
$objectclass='AccountingAccount';
$permtoread = $user->rights->accounting->read;
$permtodelete = $user->rights->accounting->delete;
$uploaddir = $conf->accounting->dir_output;
include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php';
}

if ($massaction == 'ventil') {
$msg='';
Expand Down Expand Up @@ -184,6 +193,9 @@
$sql.= " l.rowid, l.fk_product, l.description, l.total_ht as price, l.fk_code_ventilation, l.product_type as type_l, l.tva_tx as tva_tx_line, l.vat_src_code,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type, p.accountancy_code_buy as code_buy, p.tva_tx as tva_tx_prod,";
$sql.= " aa.rowid as aarowid";
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListSelect',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;
$sql.= " FROM " . MAIN_DB_PREFIX . "facture_fourn as f";
$sql.= " INNER JOIN " . MAIN_DB_PREFIX . "facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
$sql.= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON p.rowid = l.fk_product";
Expand Down Expand Up @@ -220,6 +232,11 @@
}
$sql .= " AND f.entity IN (" . getEntity('facture_fourn', 0) . ")"; // We don't share object for accountancy

// Add where from hooks
$parameters=array();
$reshook=$hookmanager->executeHooks('printFieldListWhere',$parameters); // Note that $action and $object may have been modified by hook
$sql.=$hookmanager->resPrint;

$sql .= $db->order($sortfield, $sortorder);

// Count total nb of records
Expand Down
38 changes: 21 additions & 17 deletions htdocs/admin/translation.php
Expand Up @@ -338,6 +338,9 @@

$recordtoshow=array();

// Search modules dirs
$modulesdir = dolGetModulesDirs();

$nbempty=0;
/*var_dump($langcode);
var_dump($transkey);
Expand All @@ -351,29 +354,30 @@
}
else
{
// Load all translations keys
foreach($conf->file->dol_document_root as $keydir => $searchdir)
// Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root)
foreach($modulesdir as $keydir => $tmpsearchdir)
{
// Directory of translation files
$dir_lang = $searchdir."/langs/".$langcode;
$dir_lang_osencoded=dol_osencode($dir_lang);

$filearray=dol_dir_list($dir_lang_osencoded,'files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);

foreach($filearray as $file)
{
$tmpfile=preg_replace('/.lang/i', '', basename($file['name']));
$newlang->load($tmpfile, 0, 0, '', 0); // Load translation files + database overwrite
$newlangfileonly->load($tmpfile, 0, 0, '', 1); // Load translation files only
//print 'After loading lang '.$tmpfile.', newlang has '.count($newlang->tab_translate).' records<br>'."\n";
}
$searchdir = $tmpsearchdir; // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/'

// Directory of translation files
$dir_lang = dirname(dirname($searchdir))."/langs/".$langcode; // The 2 dirname is to go up in dir for 2 levels
$dir_lang_osencoded=dol_osencode($dir_lang);

$filearray=dol_dir_list($dir_lang_osencoded,'files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
foreach($filearray as $file)
{
$tmpfile=preg_replace('/.lang/i', '', basename($file['name']));
$newlang->load($tmpfile, 0, 0, '', 0); // Load translation files + database overwrite
$newlangfileonly->load($tmpfile, 0, 0, '', 1); // Load translation files only
//print 'After loading lang '.$tmpfile.', newlang has '.count($newlang->tab_translate).' records<br>'."\n";
}
}

// Now search into translation array
foreach($newlang->tab_translate as $key => $val)
{
if ($transkey && ! preg_match('/'.preg_quote($transkey).'/', $key)) continue;
if ($transvalue && ! preg_match('/'.preg_quote($transvalue).'/', $val)) continue;
if ($transkey && ! preg_match('/'.preg_quote($transkey).'/i', $key)) continue;
if ($transvalue && ! preg_match('/'.preg_quote($transvalue).'/i', $val)) continue;
$recordtoshow[$key]=$val;
}
}
Expand Down
2 changes: 1 addition & 1 deletion htdocs/api/class/api_login.class.php
Expand Up @@ -36,7 +36,7 @@ function __construct() {
*
* Request the API token for a couple username / password.
* Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file).
* Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "api_key" into field at the top right of page (Note: "api_key" can be found/set on the user page).
* Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: Tha API key (DOLAPIKEY) can be found/set on the user page.
*
* @param string $login User login
* @param string $password User password
Expand Down

0 comments on commit 2f2b063

Please sign in to comment.