diff --git a/ChangeLog b/ChangeLog
index ce7d35884fe..541e7963d36 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
@@ -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
@@ -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)
@@ -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.
diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss
index 2ef8ab32f22..cf4949fcf40 100644
--- a/build/exe/doliwamp/doliwamp.iss
+++ b/build/exe/doliwamp/doliwamp.iss
@@ -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 http://www.microsoft.com/en-us/download/details.aspx?id=30679 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
diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl
index e0fa89d924d..2802e55c702 100755
--- a/build/makepack-dolibarr.pl
+++ b/build/makepack-dolibarr.pl
@@ -571,6 +571,7 @@ if ($nboftargetok) {
$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`;
@@ -579,6 +580,7 @@ if ($nboftargetok) {
$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_*`;
@@ -590,6 +592,8 @@ if ($nboftargetok) {
$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";
diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index 3b9ef4cc447..3c2b7b3c932 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -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)
{
...
diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php
index d3252b01a18..2c574f91f8b 100644
--- a/htdocs/accountancy/bookkeeping/card.php
+++ b/htdocs/accountancy/bookkeeping/card.php
@@ -631,7 +631,7 @@ if ($action == 'create') {
print "\n";
}
- if ($total_debit != $total_credit)
+ if (price2num($total_debit) != price2num($total_credit))
{
setEventMessages(null, array($langs->trans('MvtNotCorrectlyBalanced', $total_credit, $total_debit)), 'warnings');
}
diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index 5e78d735523..f675c010b37 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -85,6 +85,9 @@ if ($user->societe_id > 0)
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);
@@ -98,26 +101,33 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOU
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='';
@@ -182,6 +192,9 @@ $sql = "SELECT f.facnumber, f.rowid as facid, f.datef, f.type as ftype,";
$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";
@@ -223,6 +236,11 @@ if (! empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
}
$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
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 84c341400d7..541052ac9c3 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -85,6 +85,9 @@ if ($user->societe_id > 0)
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.....
@@ -99,26 +102,32 @@ $aarowid_p = $accounting->fetch('', $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUN
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
-{
- $search_lineid = '';
- $search_ref = '';
- $search_invoice = '';
- $search_label = '';
- $search_desc = '';
- $search_amount = '';
- $search_account = '';
- $search_vat = '';
-}
+$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');
-// 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 (empty($reshook))
+{
+ // 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';
+}
if ($massaction == 'ventil') {
$msg='';
@@ -184,6 +193,9 @@ $sql = "SELECT f.rowid as facid, f.ref, f.ref_supplier, f.libelle as invoice_lab
$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";
@@ -220,6 +232,11 @@ if (strlen(trim($search_vat))) {
}
$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
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index 7e0468107df..651335d0a6d 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -338,6 +338,9 @@ if ($mode == 'searchkey')
$recordtoshow=array();
+ // Search modules dirs
+ $modulesdir = dolGetModulesDirs();
+
$nbempty=0;
/*var_dump($langcode);
var_dump($transkey);
@@ -351,29 +354,30 @@ if ($mode == 'searchkey')
}
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);
+ $searchdir = $tmpsearchdir; // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/'
- $filearray=dol_dir_list($dir_lang_osencoded,'files',0,'','',$sortfield,(strtolower($sortorder)=='asc'?SORT_ASC:SORT_DESC),1);
+ // 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);
- 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
'."\n";
- }
+ $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
'."\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;
}
}
diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php
index c6b71e8b25c..d59e0036423 100644
--- a/htdocs/api/class/api_login.class.php
+++ b/htdocs/api/class/api_login.class.php
@@ -36,7 +36,7 @@ class Login
*
* 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
diff --git a/htdocs/api/index.php b/htdocs/api/index.php
index d34a97ed298..7bb062c03df 100644
--- a/htdocs/api/index.php
+++ b/htdocs/api/index.php
@@ -128,7 +128,7 @@ if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/resources.json' |
foreach ($modulesdir as $dir)
{
// Search available module
- dol_syslog("Scan directory ".$dir." for module descriptor to after search for API files");
+ dol_syslog("Scan directory ".$dir." for module descriptor files, then search for API files");
$handle=@opendir(dol_osencode($dir));
if (is_resource($handle))
@@ -139,14 +139,14 @@ if (! empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/resources.json' |
{
$module = strtolower($regmod[1]);
$moduledirforclass = getModuleDirForApiClass($module);
- $moduleforperm = $module;
- if ($module == 'propale') { $moduleforperm='propal'; }
+ $modulenameforenabled = $module;
+ if ($module == 'propale') { $modulenameforenabled='propal'; }
- //dol_syslog("Found module file ".$file." - module=".$module." - moduledirforclass=".$moduledirforclass);
+ dol_syslog("Found module file ".$file." - module=".$module." - moduledirforclass=".$moduledirforclass);
// Defined if module is enabled
$enabled=true;
- if (empty($conf->$moduleforperm->enabled)) $enabled=false;
+ if (empty($conf->$modulenameforenabled->enabled)) $enabled=false;
if ($enabled)
{
@@ -235,7 +235,13 @@ if (! empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/resources.json'
if ($module == 'order') { $classname='Commande'; }
//var_dump($classfile);var_dump($classname);exit;
- require_once $dir_part_file;
+ $res = include_once $dir_part_file;
+ if (! $res)
+ {
+ print 'API not found (failed to include API file)';
+ header('HTTP/1.1 501 API not found (failed to include API file)');
+ exit(0);
+ }
if (class_exists($classname.'Api')) $api->r->addAPIClass($classname.'Api', '/');
}
else
@@ -246,7 +252,14 @@ if (! empty($reg[1]) && ($reg[1] != 'explorer' || ($reg[2] != '/resources.json'
$dir_part_file = dol_buildpath('/'.$moduledirforclass.'/class/api_'.$classfile.'.class.php');
$classname=ucwords($module);
- require_once $dir_part_file;
+ $res = include_once $dir_part_file;
+ if (! $res)
+ {
+ print 'API not found (failed to include API file)';
+ header('HTTP/1.1 501 API not found (failed to include API file)');
+ exit(0);
+ }
+
if (class_exists($classname)) $api->r->addAPIClass($classname);
}
}
diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php
index 8a1508b7a04..2ad4582634f 100644
--- a/htdocs/blockedlog/class/blockedlog.class.php
+++ b/htdocs/blockedlog/class/blockedlog.class.php
@@ -108,6 +108,17 @@ class BlockedLog
$this->error++;
}
}
+ if($this->element === 'invoice_supplier') {
+ require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
+
+ $object = new FactureFournisseur($this->db);
+ if($object->fetch($this->fk_object)>0) {
+ return $object->getNomUrl(1);
+ }
+ else{
+ $this->error++;
+ }
+ }
else if($this->element === 'payment') {
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
@@ -119,6 +130,17 @@ class BlockedLog
$this->error++;
}
}
+ else if($this->element === 'payment_supplier') {
+ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
+
+ $object = new PaiementFourn($this->db);
+ if($object->fetch($this->fk_object)>0) {
+ return $object->getNomUrl(1);
+ }
+ else{
+ $this->error++;
+ }
+ }
return $langs->trans('ImpossibleToReloadObject', $this->element, $this->fk_object);
@@ -153,7 +175,7 @@ class BlockedLog
*/
public function setObjectData(&$object) {
- if($object->element=='payment') {
+ if($object->element=='payment' || $object->element=='payment_supplier') {
$this->date_object = $object->datepaye;
}
else{
@@ -183,13 +205,28 @@ class BlockedLog
$this->object_data->note_private= (double) $object->note_private;
}
- elseif($this->element==='payment'){
+ if($this->element === 'invoice_supplier') {
+ if(empty($object->thirdparty))$object->fetch_thirdparty();
+ $this->object_data->thirdparty = new stdClass();
+
+ foreach($object->thirdparty as $key=>$value) {
+ if(!is_object($value)) $this->object_data->thirdparty->{$key} = $value;
+ }
+
+ $this->object_data->total_ht = (double) $object->total_ht;
+ $this->object_data->total_tva = (double) $object->total_tva;
+ $this->object_data->total_ttc = (double) $object->total_ttc;
+ $this->object_data->total_localtax1= (double) $object->total_localtax1;
+ $this->object_data->total_localtax2= (double) $object->total_localtax2;
+ $this->object_data->note_public = (double) $object->note_public;
+ $this->object_data->note_private= (double) $object->note_private;
+
+ }
+ elseif($this->element==='payment'|| $object->element=='payment_supplier'){
$this->object_data->amounts = $object->amounts;
}
-
-
}
/**
@@ -511,6 +548,15 @@ class BlockedLog
$this->amounts = (double) $obj->amount;
}
}
+ if($this->element === 'payment_supplier') {
+ $sql="SELECT amount FROM ".MAIN_DB_PREFIX."paiementfourn WHERE rowid=".$this->fk_object;
+
+ $res = $this->db->query($sql);
+
+ if($res && $obj = $this->db->fetch_object($res)) {
+ $this->amounts = (double) $obj->amount;
+ }
+ }
elseif($this->element === 'facture') {
$sql="SELECT total_ttc FROM ".MAIN_DB_PREFIX."facture WHERE rowid=".$this->fk_object;
diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php
index 24876a0a8fb..25ddfd8c1f8 100644
--- a/htdocs/cashdesk/facturation_verif.php
+++ b/htdocs/cashdesk/facturation_verif.php
@@ -114,10 +114,13 @@ switch($action)
{
if (count($prodcustprice->lines) > 0)
{
- $pu_ht = price($prodcustprice->lines [0]->price);
- $pu_ttc = price($prodcustprice->lines [0]->price_ttc);
- $price_base_type = $prodcustprice->lines [0]->price_base_type;
- $tva_tx = $prodcustprice->lines [0]->tva_tx;
+ $pu_ht = price($prodcustprice->lines[0]->price);
+ $pu_ttc = price($prodcustprice->lines[0]->price_ttc);
+ $price_base_type = $prodcustprice->lines[0]->price_base_type;
+ $tva_tx = $prodcustprice->lines[0]->tva_tx;
+ if ($prodcustprice->lines[0]->default_vat_code && ! preg_match('/\(.*\)/', $tva_tx)) $tva_tx.= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
+ $tva_npr = $prodcustprice->lines[0]->recuperableonly;
+ if (empty($tva_tx)) $tva_npr=0;
}
}
else
diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index 03d73635c17..c8fd5d32c2e 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -1329,6 +1329,8 @@ if ($id > 0)
print '';
if ($object->datep != $object->datef && in_array($user->id,array_keys($listofuserid)))
{
+ //var_dump($object->userassigned);
+ //var_dump($listofuserid);
print '
| '. - ''. + print ' | |||||
| '. + ''. ' | '. ''. - ''. + ''. ' | '. ''. - ''. + ''. ' | '. ''. - ''. + ''. ' | '. ''. - $form->select_date('', 'search_date', 0, 0, 1, '', 1, 0, 1, 0, ''). + $form->select_date($search_date, 'search_date', 0, 0, 1, '', 1, 0, 1, 0, ''). ' | '. '';
$searchpicto=$form->showFilterAndCheckAddButtons(0);
@@ -190,7 +210,7 @@ if ($resql)
$_SERVER['PHP_SELF'],
'cf.ref',
'',
- '',
+ $param,
'',
$sortfield,
$sortorder
@@ -200,7 +220,7 @@ if ($resql)
$_SERVER['PHP_SELF'],
's.nom',
'',
- '',
+ $param,
'',
$sortfield,
$sortorder
@@ -220,7 +240,7 @@ if ($resql)
$_SERVER['PHP_SELF'],
'cf.total_ttc',
'',
- '',
+ $param,
'',
$sortfield,
$sortorder
@@ -230,7 +250,7 @@ if ($resql)
$_SERVER['PHP_SELF'],
'cf.date_creation',
'',
- '',
+ $param,
'',
$sortfield,
$sortorder
@@ -240,7 +260,7 @@ if ($resql)
$_SERVER['PHP_SELF'],
'cf.fk_statut',
'',
- '',
+ $param,
'align="right"',
$sortfield,
$sortorder
diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php
index b767c35e329..36b55ea79ff 100644
--- a/htdocs/projet/activity/perday.php
+++ b/htdocs/projet/activity/perday.php
@@ -237,7 +237,7 @@ if ($action == 'addtime' && $user->rights->projet->lire)
$object->fetch($key);
$object->progress = GETPOST($key.'progress', 'int');
$object->timespent_duration = $val;
- $object->timespent_fk_user = $user->id;
+ $object->timespent_fk_user = $usertoprocess->id;
$object->timespent_note = GETPOST($key.'note');
if (GETPOST($key."hour") != '' && GETPOST($key."hour") >= 0) // If hour was entered
{
diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php
index 9a513a4bce6..33642d4d3b6 100644
--- a/htdocs/projet/tasks/time.php
+++ b/htdocs/projet/tasks/time.php
@@ -975,19 +975,19 @@ if (($id > 0 || ! empty($ref)) || $projectidforalltimes > 0)
print ' '; print ''; } - else if ($user->rights->projet->lire) // Read project and enter time consumed on assigned tasks + else if ($user->rights->projet->lire || $user->rights->projet->all->creer) // Read project and enter time consumed on assigned tasks { - if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids)) - { - print ' '; - print 'fk_task.'&action=editline&lineid='.$task_time->rowid.($withproject?'&withproject=1':'').'">'; - print img_edit(); - print ''; + if ($task_time->fk_user == $user->id || in_array($task_time->fk_user, $childids) || $user->rights->projet->all->creer) + { + print ' '; + print 'fk_task.'&action=editline&lineid='.$task_time->rowid.($withproject?'&withproject=1':'').'">'; + print img_edit(); + print ''; - print ' '; - print 'fk_task.'&action=deleteline&lineid='.$task_time->rowid.($withproject?'&withproject=1':'').'">'; - print img_delete(); - print ''; + print ' '; + print 'fk_task.'&action=deleteline&lineid='.$task_time->rowid.($withproject?'&withproject=1':'').'">'; + print img_delete(); + print ''; } } print ' | ';
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index 876300aef28..4807591b9f3 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -2021,10 +2021,13 @@ else
print $object->getLibCustProspStatut();
print '
| '.$langs->trans('Supplier').' | '; - print yn($object->fournisseur); - print ' | ||||
| '.$langs->trans('Supplier').' | '; + print yn($object->fournisseur); + print ' | ||||
| '; print $langs->trans('SupplierCode').' | '; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 515015b5b5a..e809f800bb5 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2868,6 +2868,12 @@ span.boxstatstext { opacity: 0.8; line-height: 18px; } +span.boxstatstext img, a.dashboardlineindicatorlate img { + border: 0; +} +a img { + border: 0; +} span.boxstatsindicator { font-size: 130%; font-weight: normal; @@ -3401,7 +3407,7 @@ table.cal_month td:last-child { border-right: 0px; } .cal_today_peruser { background: #FDFDF0; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today_peruser_peruserleft { background: #FDFDF0; border-left: solid 2px #6C7C7B; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past { } -.cal_peruser { padding: 0px; } +.cal_peruser { padding-top: 0 !important; padding-bottom: 0 !important; padding-: 1px !important; padding-: 1px !important; } .cal_impair { background: #F8F8F8; } .cal_today_peruser_impair { background: #F8F8F0; } .peruser_busy { background: #CC8888; } | ||||