diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 0b03fc57c09..0acc2ae4bd9 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -306,7 +306,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid); +$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields); $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'); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 8a361d2f302..98d2b59d6a3 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -236,7 +236,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid); +$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields); $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'); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 22f51f3543c..4f87cf8bc69 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -299,7 +299,7 @@ if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massa $massaction = ''; } -$parameters = array('socid'=>$socid); +$parameters = array('socid'=>$socid, 'arrayfields'=>&$arrayfields); $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'); diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 9d9bd226fd6..25e0f914807 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -280,9 +280,6 @@ print ''; print '
'."\n"; print ''; -//print ''; -//print ''; - print ''; print_liste_field_titre($arrayfields['thirdparty']['label'], $_SERVER["PHP_SELF"], "thirdparty_name", "", $param, "", $sortfield, $sortorder); print_liste_field_titre($arrayfields['contact']['label'], $_SERVER["PHP_SELF"], "contact_name", "", $param, "", $sortfield, $sortorder); @@ -316,7 +313,17 @@ foreach ($list as $entry) { print ""; } - +if (empty($list)) { + $colspan = 5 + ($permission ? 1 : 0); + print ''; +} print "
'; + if (is_object($object) && !empty($object->thirdparty)) { + print $form->textwithpicto($langs->trans("NoSpecificContactAddress"), $langs->trans("NoSpecificContactAddressBis")); + } else { + print $langs->trans("NoSpecificContactAddress"); + } + print ''; + print '
"; print '
'; diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 00ff356768e..be24a555a3c 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -292,7 +292,8 @@ if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { } } $tooltiponprice .= '
'.$langs->transcountry("TotalTTC", $mysoc->country_code).'='.price($line->total_ttc); - $tooltiponprice .= ''; + + $tooltiponprice = ''; $tooltiponpriceend = ''; } diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 9e3a9ba7808..504336f0a6e 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -68,7 +68,7 @@ $hookmanager->initHooks(array('ordersupplierdispatch')); // Recuperation de l'id de projet $projectid = 0; -if ($_GET["projectid"]) { +if (GETPOSTISSET("projectid")) { $projectid = GETPOST("projectid", 'int'); } @@ -782,7 +782,8 @@ if ($id > 0 || !empty($ref)) { if (!$objp->fk_product > 0) { $nbfreeproduct++; } else { - $remaintodispatch = price2num($objp->qty - ((float) $products_dispatched[$objp->rowid]), 5); // Calculation of dispatched + $alreadydispatched = isset($products_dispatched[$objp->rowid])?$products_dispatched[$objp->rowid]:0; + $remaintodispatch = price2num($objp->qty - ((float) $alreadydispatched), 5); // Calculation of dispatched if ($remaintodispatch < 0 && empty($conf->global->SUPPLIER_ORDER_ALLOW_NEGATIVE_QTY_FOR_SUPPLIER_ORDER_RETURN)) { $remaintodispatch = 0; } @@ -799,7 +800,7 @@ if ($id > 0 || !empty($ref)) { print ''."\n"; // hidden fields for js function print ''; - print ''; + print ''; print ''; if (empty($conf->cache['product'][$objp->fk_product])) { @@ -860,7 +861,7 @@ if ($id > 0 || !empty($ref)) { print ''.$objp->qty.''; // Already dispatched - print ''.$products_dispatched[$objp->rowid].''; + print ''.$alreadydispatched.''; if (isModEnabled('productbatch') && $objp->tobatch > 0) { $type = 'batch'; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f7d4b4b8820..e747f004c87 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -1211,3 +1211,6 @@ CreatedByPublicPortal=Created from Public portal UserAgent=User Agent InternalUser=Internal user ExternalUser=External user +NoSpecificContactAddress=No specific contact or address +NoSpecificContactAddressBis=This tab is dedicated to force specific contacts or addresses for the current object. Use it only if you want to define one or several specific contacts or addresses for the object when the information on the thirdparty is not enough or not accurate. + diff --git a/htdocs/modulebuilder/README.md b/htdocs/modulebuilder/README.md index 7bafab32ae3..26b0ecf717b 100644 --- a/htdocs/modulebuilder/README.md +++ b/htdocs/modulebuilder/README.md @@ -7,7 +7,7 @@ has to offer for module development. If you don't need to develop your own module/application, you just don't need this. -After enabling this module, you should find features to generate or edit modules/application from menu *Home - Admin tools - Module builder* +After enabling this module, you should find features to generate or edit modules/application from menu *Home - Tools - Module builder* Documentation ------------- diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php index 0c4f3e57ff5..966d04241cd 100644 --- a/htdocs/salaries/card.php +++ b/htdocs/salaries/card.php @@ -658,18 +658,25 @@ if ($action == 'create' && $permissiontoadd) { print '