Merge branch 'develop' of https://github.com/Dolibarr/dolibarr.git into develop_dict

This commit is contained in:
Regis Houssin 2017-06-11 11:26:24 +02:00
commit cc75916599
49 changed files with 220 additions and 154 deletions

View File

@ -27,6 +27,9 @@ Following changes may create regression for some external modules, but were nece
exists, but if an external module need action on it, it must provides itself its trigger file. exists, but if an external module need action on it, it must provides itself its trigger file.
* Use $conf->global->MULTICOMPANY_TRANSVERSE_MODE instead $conf->multicompany->transverse_mode * Use $conf->global->MULTICOMPANY_TRANSVERSE_MODE instead $conf->multicompany->transverse_mode
* Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx') * Use getEntity('xxx') instead getEntity('xxx', 1) and use getEntity('xxx', 0) instead getEntity('xxx')
* The hook formObjectOptions was not implemented correctly in previous version. Sometimes, you had to return output
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.3 compared to 5.0.2 ***** ***** ChangeLog for 5.0.3 compared to 5.0.2 *****
FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty FIX: #6677 Expired contracts dashboard box does not show the name of the thirdparty

View File

@ -103,25 +103,24 @@ Voir fichier ChangeLog.
### Divers: ### Divers:
- Application multi-utilisateurs avec différents niveaux de permissions par module. - Multi-langue.
- Multi-utilisateurs avec différents niveaux de permissions par module.
- Multi-devise.
- Peux être multi-société par ajout du module externe multi-société. - Peux être multi-société par ajout du module externe multi-société.
- Peux-être multi-devise par ajout du module externe multi-devise.
- Plusieurs gestionnaires de menus (possibilité de différencier les menus pour les utilisateurs internes ou externes comme les clients ou fournisseurs).
- Application simple à utiliser.
- Plusieurs thèmes visuels. - Plusieurs thèmes visuels.
- Code simple et facilement personnalisable. - Application simple à utiliser.
- Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur http://wiki.dolibarr.org/index.php/Prérequis). - Requiert PHP et MariaDb, Mysql ou Postgresql (Voir versions exactes sur https://wiki.dolibarr.org/index.php/Prérequis).
- Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP. - Compatible avec toutes les offres Cloud du marché respectant les prérequis de base de données et PHP.
- Export PDF de tous les éléments (factures, propositions commerciales, commandes, bons expéditions, etc...) - Code simple et facilement personnalisable (pas de framework lourd; mécanisme de hook et triggers).
- APIs.
- Génération PDF et ODT des éléments (factures, propositions commerciales, commandes, bons expéditions, etc...)
## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE) ## CE QUE DOLIBARR NE PEUT PAS FAIRE (TACHES A FAIRE)
Voici un liste de fonctionnalites pas encore gérées par Dolibarr: Voici un liste de fonctionnalites pas encore gérées par Dolibarr:
- Pas encore de compta analytique double-partie (uniquement gestion de trésorerie).
- Dolibarr ne gère qu'une seule monnaie à la fois (mono-devise).
- Dolibarr ne contient pas de module de Gestion de la paie. - Dolibarr ne contient pas de module de Gestion de la paie.
- Les tâches du module de gestion de projets n'ont pas de dépendance entre elle. - Les tâches du module de gestion de projets n'ont pas de dépendances entre elle.
- Dolibarr ne contient pas de Webmail. - Dolibarr ne contient pas de Webmail.
- Dolibarr ne fait pas le café (pas encore). - Dolibarr ne fait pas le café (pas encore).

View File

@ -81,7 +81,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
## FEATURES ## FEATURES
### Main modules (all optional) ### Main application/modules (all optional)
- Customers, Prospects and/or Suppliers directory - Customers, Prospects and/or Suppliers directory
- Products and/or Services catalog - Products and/or Services catalog
@ -107,7 +107,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- Point of Sale - Point of Sale
- … - …
### Other modules ### Other application/modules
- Bookmarks management - Bookmarks management
- Donations management - Donations management
@ -124,33 +124,35 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog)
- … - …
### Other general features ### Other general features
- Multi-Users and groups with finely grained rights
- Localization in most major languages - Localization in most major languages.
- Can manage several companies by adding external module multi-company. - Multi-Users and groups with finely grained rights.
- Can manage several currencies by adding external module multi-currency. - Multi-currency.
- Very user friendly and easy to use - Multi-company by adding of an external module.
- Very user friendly and easy to use.
- Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one)
- Works with PHP 5.3+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](http://wiki.dolibarr.org/index.php/Prerequisite)) - Works with PHP 5.3+ and MariaDB 5.0.3+, MySQL 5.0.3+ or PostgreSQL 8.1.4+ (See requirements on the [Wiki](https://wiki.dolibarr.org/index.php/Prerequisite))
- Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites. - Compatible with all Cloud solutions that match MySQL, PHP or PostgreSQL prerequisites.
- An easy to understand, maintain and code interfaces with your own information system (PHP with no heavy framework; trigger and hook architecture) - APIs.
- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture)
- Support for country specific features: - Support for country specific features:
- Spanish Tax RE and ISPF - Spanish Tax RE and ISPF
- French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM)
- Canadian double taxes (federal/province) and other countries using cumulative VAT - Canadian double taxes (federal/province) and other countries using cumulative VAT
- Tunisian tax stamp - Tunisian tax stamp
- Argentina invoice numbering using A,B,C...
- Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE)
- PDF or ODT generation for invoice, proposals, orders... - PDF or ODT generation for invoice, proposals, orders...
- … - …
### Extending ### Extending
Dolibarr can be extended with a lot of other external modules from third party developers available at the [DoliStore](https://www.dolistore.com). Dolibarr can be extended with a lot of other external application or modules from third party developers available at the [DoliStore](https://www.dolistore.com).
## FUTURE ## FUTURE
These are features that Dolibarr does **not** yet fully support: These are features that Dolibarr does **not** yet fully support:
- Double-entry bookkeeping yet (only bank and treasury management)
- Tasks dependencies in projects - Tasks dependencies in projects
- Payroll module - Payroll module
- Webmail - Webmail

View File

@ -943,6 +943,7 @@ else
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
@ -1185,6 +1186,7 @@ else
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit',$parameters); print $object->showOptionals($extrafields,'edit',$parameters);

View File

@ -278,6 +278,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
@ -668,6 +669,7 @@ if ($rowid > 0)
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$act,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -268,7 +268,8 @@ if ($user->rights->categorie->creer)
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
} }

View File

@ -175,6 +175,7 @@ print '</td></tr>';
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -833,7 +833,8 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label)) print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
} }
@ -1164,7 +1165,8 @@ if ($id > 0)
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label)) print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
} }

View File

@ -777,8 +777,9 @@ if ($object->fetch($id) >= 0) {
if (! empty($advTarget->id)) { if (! empty($advTarget->id)) {
$parameters = array('array_query' => $advTarget->filtervalue); $parameters = array('array_query' => $advTarget->filtervalue);
} }
// Module extrafield feature // Other attributes
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $std_soc, $action_search); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $std_soc, $action_search);
print $hookmanager->resPrint;
} }
// State Contact // State Contact

View File

@ -718,6 +718,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
@ -1153,6 +1154,7 @@ else
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -1527,6 +1527,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters = array(); $parameters = array();
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (empty($reshook) && ! empty($extrafields->attribute_label)) {
print $object->showOptionals($extrafields, 'edit'); print $object->showOptionals($extrafields, 'edit');
} }

View File

@ -1609,6 +1609,7 @@ if ($action == 'create' && $user->rights->commande->creer)
// Other attributes // Other attributes
$parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid); $parameters = array('objectsrc' => $objectsrc, 'socid'=>$socid);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (empty($reshook) && ! empty($extrafields->attribute_label)) {
print $object->showOptionals($extrafields, 'edit'); print $object->showOptionals($extrafields, 'edit');
} }

View File

@ -471,6 +471,7 @@ if ($action == 'create' && !$error)
// Other attributes // Other attributes
$parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders); $parameters=array('objectsrc' => $objectsrc, 'idsrc' => $listoforders);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
$object=new Facture($db); $object=new Facture($db);

View File

@ -409,6 +409,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit',$parameters); print $object->showOptionals($extrafields,'edit',$parameters);
@ -946,6 +947,7 @@ else
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -284,6 +284,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';

View File

@ -300,6 +300,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';
@ -396,6 +397,7 @@ else if ($id)
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';

View File

@ -2594,6 +2594,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters = array('objectsrc' => $objectsrc,'colspan' => ' colspan="2"', 'cols'=>2); $parameters = array('objectsrc' => $objectsrc,'colspan' => ' colspan="2"', 'cols'=>2);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (empty($reshook) && ! empty($extrafields->attribute_label)) {
print $object->showOptionals($extrafields, 'edit'); print $object->showOptionals($extrafields, 'edit');
} }

View File

@ -202,6 +202,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';
@ -271,6 +272,7 @@ if ($id)
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$vatpayment,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$vatpayment,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';

View File

@ -302,6 +302,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';
@ -389,6 +390,7 @@ if ($id)
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';

View File

@ -284,6 +284,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';
@ -351,6 +352,7 @@ if ($id)
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '</table>'; print '</table>';

View File

@ -666,6 +666,7 @@ else
// Other attributes // Other attributes
$parameters=array('colspan' => ' colspan="3"','cols'=>3); $parameters=array('colspan' => ' colspan="3"','cols'=>3);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
@ -934,6 +935,7 @@ else
// Other attributes // Other attributes
$parameters=array('colspan' => ' colspan="3"', 'cols'=>3); $parameters=array('colspan' => ' colspan="3"', 'cols'=>3);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -1211,6 +1211,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array('objectsrc' => $objectsrc,'colspan' => ' colspan="3"', 'cols'=>3); $parameters=array('objectsrc' => $objectsrc,'colspan' => ' colspan="3"', 'cols'=>3);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Other attributes // Other attributes
if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (empty($reshook) && ! empty($extrafields->attribute_label)) {

View File

@ -34,6 +34,7 @@ if (! empty($cols)) $parameters['cols'] = $cols;
if (! empty($object->fk_soc)) $parameters['socid'] = $object->fk_soc; if (! empty($object->fk_soc)) $parameters['socid'] = $object->fk_soc;
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action);
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element]['label'])) if (empty($reshook) && ! empty($extrafields->attributes[$object->table_element]['label']))

View File

@ -373,6 +373,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit',$parameters); print $object->showOptionals($extrafields,'edit',$parameters);
@ -498,6 +499,7 @@ if (! empty($id) && $action == 'edit')
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -774,6 +774,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'socid'=>$socid); $parameters = array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"', 'socid'=>$socid);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$expe,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (empty($reshook) && ! empty($extrafields->attribute_label)) {
print $expe->showOptionals($extrafields, 'edit'); print $expe->showOptionals($extrafields, 'edit');

View File

@ -1376,7 +1376,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters = array('colspan' => ' colspan="3"'); $parameters = array('colspan' => ' colspan="3"');
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by
// hook print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (empty($reshook) && ! empty($extrafields->attribute_label)) {
print $object->showOptionals($extrafields, 'edit'); print $object->showOptionals($extrafields, 'edit');
} }

View File

@ -581,7 +581,7 @@ if (empty($reshook))
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} }
/* /*
* Mise a jour d'une ligne d'intervention * Mise a jour d'une ligne d'intervention
*/ */
@ -997,7 +997,8 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array('colspan' => ' colspan="2"'); $parameters=array('colspan' => ' colspan="2"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
if (empty($reshook) && ! empty($extrafields->attribute_label)) print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
} }
@ -1147,11 +1148,11 @@ else if ($id > 0 || ! empty($ref))
// Print form confirm // Print form confirm
print $formconfirm; print $formconfirm;
// Intervention card // Intervention card
$linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/fichinter/list.php'.(! empty($socid)?'?socid='.$socid:'').'">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
// Ref customer // Ref customer
//$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->fichinter->creer, 'string', '', 0, 1); //$morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $user->rights->fichinter->creer, 'string', '', 0, 1);
@ -1191,16 +1192,16 @@ else if ($id > 0 || ! empty($ref))
} }
} }
$morehtmlref.='</div>'; $morehtmlref.='</div>';
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="fichehalfleft">'; print '<div class="fichehalfleft">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
if (! empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES)) if (! empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES))
{ {
// Date Start // Date Start
@ -1279,14 +1280,14 @@ else if ($id > 0 || ! empty($ref))
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '</table>'; print '</table>';
print '</div>'; print '</div>';
print '<div class="fichehalfright">'; print '<div class="fichehalfright">';
print '<div class="ficheaddleft">'; print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent">'; print '<table class="border centpercent">';
if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) if (empty($conf->global->FICHINTER_DISABLE_DETAILS))
{ {
// Duration // Duration
@ -1294,15 +1295,15 @@ else if ($id > 0 || ! empty($ref))
print '<td>'.convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>'; print '<td>'.convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'</td>';
print '</tr>'; print '</tr>';
} }
print "</table>"; print "</table>";
print '</div>'; print '</div>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
print '<div class="clearboth"></div><br>'; print '<div class="clearboth"></div><br>';
if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{ {
@ -1367,7 +1368,7 @@ else if ($id > 0 || ! empty($ref))
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
// Ligne en mode visu // Ligne en mode visu
if ($action != 'editline' || GETPOST('line_id','int') != $objp->rowid) if ($action != 'editline' || GETPOST('line_id','int') != $objp->rowid)
@ -1488,7 +1489,7 @@ else if ($id > 0 || ! empty($ref))
// Add new line // Add new line
if ($object->statut == 0 && $user->rights->ficheinter->creer && $action <> 'editline' && empty($conf->global->FICHINTER_DISABLE_DETAILS)) if ($object->statut == 0 && $user->rights->ficheinter->creer && $action <> 'editline' && empty($conf->global->FICHINTER_DISABLE_DETAILS))
{ {
if (! $num) if (! $num)
{ {
print '<br><table class="noborder" width="100%">'; print '<br><table class="noborder" width="100%">';
@ -1501,7 +1502,7 @@ else if ($id > 0 || ! empty($ref))
print '<td colspan="3">&nbsp;</td>'; print '<td colspan="3">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
} }
print '<tr class="oddeven">'."\n"; print '<tr class="oddeven">'."\n";
print '<td>'; print '<td>';
// editeur wysiwyg // editeur wysiwyg
@ -1655,7 +1656,7 @@ else if ($id > 0 || ! empty($ref))
{ {
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifydone">'.$langs->trans("InterventionClassifyDone").'</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=classifydone">'.$langs->trans("InterventionClassifyDone").'</a></div>';
} }
// Clone // Clone
if ($user->rights->ficheinter->creer) { if ($user->rights->ficheinter->creer) {
print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;socid=' . $object->socid . '&amp;action=clone&amp;object=ficheinter">' . $langs->trans("ToClone") . '</a></div>'; print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&amp;socid=' . $object->socid . '&amp;action=clone&amp;object=ficheinter">' . $langs->trans("ToClone") . '</a></div>';
@ -1698,7 +1699,7 @@ else if ($id > 0 || ! empty($ref))
// Show links to link elements // Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('fichinter')); $linktoelem = $form->showLinkToObjectBlock($object, null, array('fichinter'));
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
print '</div><div class="fichehalfright"><div class="ficheaddleft">'; print '</div><div class="fichehalfright"><div class="ficheaddleft">';

View File

@ -1572,6 +1572,7 @@ if ($action=='create')
// Other options // Other options
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {

View File

@ -370,6 +370,7 @@ if ($action == 'create' && !$error) {
'cols'=>2 'cols'=>2
); );
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {

View File

@ -1824,6 +1824,7 @@ if ($action == 'create')
// Other options // Other options
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Bouton "Create Draft" // Bouton "Create Draft"
print "</table>\n"; print "</table>\n";

View File

@ -1047,6 +1047,7 @@ else
// Other attributes // Other attributes
$parameters=array('cols' => 3); $parameters=array('cols' => 3);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit',$parameters); print $object->showOptionals($extrafields,'edit',$parameters);
@ -1366,6 +1367,7 @@ else
// Other attributes // Other attributes
$parameters=array('colspan' => ' colspan="3"', 'cols'=>3); $parameters=array('colspan' => ' colspan="3"', 'cols'=>3);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -193,6 +193,7 @@ if ($object->id)
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
// Construit liste des fichiers // Construit liste des fichiers

View File

@ -98,7 +98,7 @@ if (empty($reshook))
if ($id) if ($id)
{ {
$result=$object->fetch($id); $result=$object->fetch($id);
$object->cost_price = price2num($cost_price); $object->cost_price = price2num($cost_price);
$result=$object->update($object->id, $user); $result=$object->update($object->id, $user);
if ($result > 0) if ($result > 0)
{ {
@ -112,7 +112,7 @@ if (empty($reshook))
} }
} }
} }
if ($action == 'confirm_remove_pf') if ($action == 'confirm_remove_pf')
{ {
if ($rowid) // id of product supplier price to remove if ($rowid) // id of product supplier price to remove
@ -299,21 +299,21 @@ if ($id > 0 || $ref)
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id . '&rowid=' . $rowid, $langs->trans('DeleteProductBuyPrice'), $langs->trans('ConfirmDeleteProductBuyPrice'), 'confirm_remove_pf', '', 0, 1); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $id . '&rowid=' . $rowid, $langs->trans('DeleteProductBuyPrice'), $langs->trans('ConfirmDeleteProductBuyPrice'), 'confirm_remove_pf', '', 0, 1);
echo $formconfirm; echo $formconfirm;
} }
if ($action <> 'edit' && $action <> 're-edit') if ($action <> 'edit' && $action <> 're-edit')
{ {
$head=product_prepare_head($object); $head=product_prepare_head($object);
$titre=$langs->trans("CardProduct".$object->type); $titre=$langs->trans("CardProduct".$object->type);
$picto=($object->type== Product::TYPE_SERVICE?'service':'product'); $picto=($object->type== Product::TYPE_SERVICE?'service':'product');
dol_fiche_head($head, 'suppliers', $titre, -1, $picto); dol_fiche_head($head, 'suppliers', $titre, -1, $picto);
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
$object->next_prev_filter=" fk_product_type = ".$object->type; $object->next_prev_filter=" fk_product_type = ".$object->type;
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
@ -338,14 +338,14 @@ if ($id > 0 || $ref)
print '</td><td colspan="2">'; print '</td><td colspan="2">';
print $form->editfieldval($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6'); print $form->editfieldval($text,'cost_price',$object->cost_price,$object,$user->rights->produit->creer||$user->rights->service->creer,'amount:6');
print '</td></tr>'; print '</td></tr>';
print '</table>'; print '</table>';
print '</div>'; print '</div>';
print '<div style="clear:both"></div>'; print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();
// Form to add or update a price // Form to add or update a price
if (($action == 'add_price' || $action == 'updateprice' ) && ($user->rights->produit->creer || $user->rights->service->creer)) if (($action == 'add_price' || $action == 'updateprice' ) && ($user->rights->produit->creer || $user->rights->service->creer))
@ -365,7 +365,7 @@ if ($id > 0 || $ref)
print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST">'; print '<form action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="updateprice">'; print '<input type="hidden" name="action" value="updateprice">';
dol_fiche_head(); dol_fiche_head();
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -450,11 +450,11 @@ if ($id > 0 || $ref)
$default_vat=get_default_tva($mysoc2, $mysoc, $object->id, 0); $default_vat=get_default_tva($mysoc2, $mysoc, $object->id, 0);
$default_npr=get_default_npr($mysoc2, $mysoc, $object->id, 0); $default_npr=get_default_npr($mysoc2, $mysoc, $object->id, 0);
if (empty($default_vat)) $default_npr=$default_vat; if (empty($default_vat)) $default_npr=$default_vat;
print '<tr><td class="fieldrequired">'.$langs->trans("VATRateForSupplierProduct").'</td>'; print '<tr><td class="fieldrequired">'.$langs->trans("VATRateForSupplierProduct").'</td>';
print '<td>'; print '<td>';
//print $form->load_tva('tva_tx',$object->tva_tx,$supplier,$mysoc); // Do not use list here as it may be any vat rates for any country //print $form->load_tva('tva_tx',$object->tva_tx,$supplier,$mysoc); // Do not use list here as it may be any vat rates for any country
if (! empty($rowid)) // If we have a supplier, it is an update, we must show the vat of current supplier price if (! empty($rowid)) // If we have a supplier, it is an update, we must show the vat of current supplier price
{ {
$tmpproductsupplier=new ProductFournisseur($db); $tmpproductsupplier=new ProductFournisseur($db);
$tmpproductsupplier->fetch_product_fournisseur_price($rowid, 1); $tmpproductsupplier->fetch_product_fournisseur_price($rowid, 1);
@ -463,7 +463,7 @@ if ($id > 0 || $ref)
} }
else else
{ {
if (empty($default_vat)) if (empty($default_vat))
{ {
$default_vat=$object->tva_tx; $default_vat=$object->tva_tx;
} }
@ -546,6 +546,7 @@ if ($id > 0 || $ref)
{ {
$parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$object->id); $parameters=array('id_fourn'=>$id_fourn,'prod_id'=>$object->id);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action);
print $hookmanager->resPrint;
} }
print '</table>'; print '</table>';
@ -589,7 +590,7 @@ if ($id > 0 || $ref)
$product_fourn_list = $product_fourn->list_product_fournisseur_price($object->id, $sortfield, $sortorder); $product_fourn_list = $product_fourn->list_product_fournisseur_price($object->id, $sortfield, $sortorder);
$nbtotalofrecords = count($product_fourn_list); $nbtotalofrecords = count($product_fourn_list);
print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($product_fourn_list), $nbtotalofrecords, 'title_accountancy.png'); print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($product_fourn_list), $nbtotalofrecords, 'title_accountancy.png');
// Suppliers list title // Suppliers list title
print '<div class="div-table-responsive">'; print '<div class="div-table-responsive">';
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
@ -608,7 +609,7 @@ if ($id > 0 || $ref)
print_liste_field_titre($langs->trans("DiscountQtyMin"),$_SERVER["PHP_SELF"],'','',$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DiscountQtyMin"),$_SERVER["PHP_SELF"],'','',$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("NbDaysToDelivery"),$_SERVER["PHP_SELF"],"pfp.delivery_time_days","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("NbDaysToDelivery"),$_SERVER["PHP_SELF"],"pfp.delivery_time_days","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ReputationForThisProduct"),$_SERVER["PHP_SELF"],"pfp.supplier_reputation","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("ReputationForThisProduct"),$_SERVER["PHP_SELF"],"pfp.supplier_reputation","",$param,'align="center"',$sortfield,$sortorder);
// Charges ???? // Charges ????
if ($conf->global->PRODUCT_CHARGES) if ($conf->global->PRODUCT_CHARGES)
{ {
@ -623,13 +624,13 @@ if ($id > 0 || $ref)
foreach($product_fourn_list as $productfourn) foreach($product_fourn_list as $productfourn)
{ {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
// Supplier // Supplier
print '<td>'.$productfourn->getSocNomUrl(1,'supplier').'</td>'; print '<td>'.$productfourn->getSocNomUrl(1,'supplier').'</td>';
// Supplier // Supplier
print '<td align="left">'.$productfourn->fourn_ref.'</td>'; print '<td align="left">'.$productfourn->fourn_ref.'</td>';
@ -675,8 +676,8 @@ if ($id > 0 || $ref)
// Reputation // Reputation
print '<td align="center">'; print '<td align="center">';
if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) { if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) {
print $object->reputations[$productfourn->supplier_reputation]; print $object->reputations[$productfourn->supplier_reputation];
} }
print'</td>'; print'</td>';
// Charges ???? // Charges ????

View File

@ -82,7 +82,7 @@ if ($id > 0 || ! empty($ref))
$result = $product->fetch($id, $ref); $result = $product->fetch($id, $ref);
$object = $product; $object = $product;
$parameters=array('id'=>$id); $parameters=array('id'=>$id);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -97,14 +97,15 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'referers', $titre, -1, $picto); dol_fiche_head($head, 'referers', $titre, -1, $picto);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
@ -114,9 +115,9 @@ if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<div style="clear:both"></div>'; print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();
if ($user->rights->commande->lire) if ($user->rights->commande->lire)
{ {
@ -211,7 +212,7 @@ if ($id > 0 || ! empty($ref))
while ($i < $num && $i < $conf->liste_limit) while ($i < $num && $i < $conf->liste_limit)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'; print '<td>';

View File

@ -88,7 +88,7 @@ if ($id > 0 || ! empty($ref)) {
$result = $product->fetch($id, $ref); $result = $product->fetch($id, $ref);
$object = $product; $object = $product;
$parameters = array ('id' => $id); $parameters = array ('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) if ($reshook < 0)
@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref)) {
llxHeader("", "", $langs->trans("CardProduct" . $product->type)); llxHeader("", "", $langs->trans("CardProduct" . $product->type));
if ($result > 0) if ($result > 0)
{ {
$head = product_prepare_head($product); $head = product_prepare_head($product);
$titre = $langs->trans("CardProduct" . $product->type); $titre = $langs->trans("CardProduct" . $product->type);
@ -104,15 +104,15 @@ if ($id > 0 || ! empty($ref)) {
dol_fiche_head($head, 'referers', $titre, -1, $picto); dol_fiche_head($head, 'referers', $titre, -1, $picto);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) print $hookmanager->resPrint;
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
@ -122,9 +122,9 @@ if ($id > 0 || ! empty($ref)) {
print '</div>'; print '</div>';
print '<div style="clear:both"></div>'; print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();
if ($user->rights->fournisseur->commande->lire) if ($user->rights->fournisseur->commande->lire)
{ {

View File

@ -72,7 +72,7 @@ if ($id > 0 || ! empty($ref))
$result = $product->fetch($id, $ref); $result = $product->fetch($id, $ref);
$object = $product; $object = $product;
$parameters=array('id'=>$id); $parameters=array('id'=>$id);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -87,14 +87,15 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'referers', $titre, -1, $picto); dol_fiche_head($head, 'referers', $titre, -1, $picto);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
@ -104,9 +105,9 @@ if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<div style="clear:both"></div>'; print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();
$now=dol_now(); $now=dol_now();
@ -141,7 +142,7 @@ if ($id > 0 || ! empty($ref))
$option .= '&amp;search_month=' . $search_month; $option .= '&amp;search_month=' . $search_month;
if (! empty($search_year)) if (! empty($search_year))
$option .= '&amp;search_year=' . $search_year; $option .= '&amp;search_year=' . $search_year;
print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $product->id . '" name="search_form">' . "\n"; print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?id=' . $product->id . '" name="search_form">' . "\n";
if (! empty($sortfield)) if (! empty($sortfield))
print '<input type="hidden" name="sortfield" value="' . $sortfield . '"/>'; print '<input type="hidden" name="sortfield" value="' . $sortfield . '"/>';
@ -151,7 +152,7 @@ if ($id > 0 || ! empty($ref))
print '<input type="hidden" name="page" value="' . $page . '"/>'; print '<input type="hidden" name="page" value="' . $page . '"/>';
$option .= '&amp;page=' . $page; $option .= '&amp;page=' . $page;
} }
print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&amp;id=$product->id",$sortfield,$sortorder,'',$num,0,''); print_barre_liste($langs->trans("Contrats"),$page,$_SERVER["PHP_SELF"],"&amp;id=$product->id",$sortfield,$sortorder,'',$num,0,'');
$i = 0; $i = 0;
@ -177,7 +178,7 @@ if ($id > 0 || ! empty($ref))
while ($i < $num && $i < $conf->liste_limit) while ($i < $num && $i < $conf->liste_limit)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td><a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowContract"),"contract").' '; print '<td><a href="'.DOL_URL_ROOT.'/contrat/card.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowContract"),"contract").' ';
@ -197,7 +198,7 @@ if ($id > 0 || ! empty($ref))
$i++; $i++;
} }
} }
print '</table>'; print '</table>';
print '</div>'; print '</div>';
print '</form>'; print '</form>';

View File

@ -83,9 +83,9 @@ if ($id > 0 || ! empty($ref))
{ {
$product = new Product($db); $product = new Product($db);
$result = $product->fetch($id, $ref); $result = $product->fetch($id, $ref);
$object = $product; $object = $product;
$parameters=array('id'=>$id); $parameters=array('id'=>$id);
$reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks $reshook=$hookmanager->executeHooks('doActions',$parameters,$product,$action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -114,14 +114,15 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'referers', $titre, -1, $picto); dol_fiche_head($head, 'referers', $titre, -1, $picto);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$product,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
@ -131,14 +132,14 @@ if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<div style="clear:both"></div>'; print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();
if ($showmessage && $nboflines > 1) if ($showmessage && $nboflines > 1)
{ {
print $langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")); print $langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers"));
} }
elseif ($user->rights->facture->lire) elseif ($user->rights->facture->lire)
{ {
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,"; $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,";
$sql.= " f.facnumber, f.datef, f.paye, f.fk_statut as statut, f.rowid as facid,"; $sql.= " f.facnumber, f.datef, f.paye, f.fk_statut as statut, f.rowid as facid,";
@ -164,13 +165,13 @@ if ($id > 0 || ! empty($ref))
$total_ht=0; $total_ht=0;
$total_qty=0; $total_qty=0;
$totalrecords=0; $totalrecords=0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{ {
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
$totalrecords = $db->num_rows($result); $totalrecords = $db->num_rows($result);
while ($objp = $db->fetch_object($result)) while ($objp = $db->fetch_object($result))
{ {
$total_ht+=$objp->total_ht; $total_ht+=$objp->total_ht;
$total_qty+=$objp->qty; $total_qty+=$objp->qty;
@ -234,7 +235,7 @@ if ($id > 0 || ! empty($ref))
while ($i < min($num,$conf->liste_limit)) while ($i < min($num,$conf->liste_limit))
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'; print '<td>';

View File

@ -84,7 +84,7 @@ if ($id > 0 || ! empty($ref))
$result = $product->fetch($id, $ref); $result = $product->fetch($id, $ref);
$object = $product; $object = $product;
$parameters = array('id' => $id); $parameters = array('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -99,14 +99,15 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'referers', $titre, -1, $picto); dol_fiche_head($head, 'referers', $titre, -1, $picto);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
@ -116,9 +117,9 @@ if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<div style="clear:both"></div>'; print '<div style="clear:both"></div>';
dol_fiche_end(); dol_fiche_end();
if ($user->rights->fournisseur->facture->lire) if ($user->rights->fournisseur->facture->lire)
{ {

View File

@ -82,7 +82,7 @@ if ($id > 0 || ! empty($ref))
$result = $product->fetch($id, $ref); $result = $product->fetch($id, $ref);
$object = $product; $object = $product;
$parameters = array ('id' => $id); $parameters = array ('id' => $id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks $reshook = $hookmanager->executeHooks('doActions', $parameters, $product, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
@ -97,14 +97,15 @@ if ($id > 0 || ! empty($ref))
dol_fiche_head($head, 'referers', $titre, -1, $picto); dol_fiche_head($head, 'referers', $titre, -1, $picto);
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $product, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/product/list.php">'.$langs->trans("BackToList").'</a>';
dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref'); dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref');
print '<div class="fichecenter">'; print '<div class="fichecenter">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border tableforfield" width="100%">'; print '<table class="border tableforfield" width="100%">';
@ -114,11 +115,11 @@ if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<div style="clear:both"></div>'; print '<div style="clear:both"></div>';
dol_fiche_end();
if ($user->rights->propale->lire) dol_fiche_end();
if ($user->rights->propale->lire)
{ {
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,"; $sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, p.rowid as propalid, p.ref, d.total_ht as amount,";
$sql .= " p.ref_client,"; $sql .= " p.ref_client,";
@ -239,7 +240,7 @@ if ($id > 0 || ! empty($ref))
} }
} }
} }
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>' . $langs->trans('Total') . '</td>'; print '<td>' . $langs->trans('Total') . '</td>';
print '<td colspan="2"></td>'; print '<td colspan="2"></td>';

View File

@ -568,7 +568,7 @@ if ($id > 0 || $ref)
// Minimum Price // Minimum Price
print '<tr><td>'.$langs->trans("BuyingPriceMin").'</td>'; print '<tr><td>'.$langs->trans("BuyingPriceMin").'</td>';
print '<td colspan="2">'; print '<td>';
$product_fourn = new ProductFournisseur($db); $product_fourn = new ProductFournisseur($db);
if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0) if ($product_fourn->find_min_price_product_fournisseur($object->id) > 0)
{ {
@ -611,17 +611,18 @@ if ($id > 0 || $ref)
} }
// Stock alert threshold // Stock alert threshold
print '<tr><td>'.$form->editfieldkey("StockLimit",'seuil_stock_alerte',$object->seuil_stock_alerte,$object,$user->rights->produit->creer).'</td><td colspan="2">'; print '<tr><td>'.$form->editfieldkey("StockLimit",'seuil_stock_alerte',$object->seuil_stock_alerte,$object,$user->rights->produit->creer).'</td><td>';
print $form->editfieldval("StockLimit",'seuil_stock_alerte',$object->seuil_stock_alerte,$object,$user->rights->produit->creer,'string'); print $form->editfieldval("StockLimit",'seuil_stock_alerte',$object->seuil_stock_alerte,$object,$user->rights->produit->creer,'string');
print '</td></tr>'; print '</td></tr>';
// Hook formObject // Hook formObject
$parameters=array('cols'=>2); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Desired stock // Desired stock
print '<tr><td>'.$form->editfieldkey($form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1),'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer); print '<tr><td>'.$form->editfieldkey($form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1),'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer);
print '</td><td colspan="2">'; print '</td><td>';
print $form->editfieldval("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer,'string'); print $form->editfieldval("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer,'string');
print '</td></tr>'; print '</td></tr>';
@ -707,7 +708,7 @@ if ($id > 0 || $ref)
{ {
dol_print_error($db); dol_print_error($db);
} }
print '<tr><td class="tdtop">'.$langs->trans("LastMovement").'</td><td colspan="3">'; print '<tr><td class="tdtop">'.$langs->trans("LastMovement").'</td><td>';
if ($lastmovementdate) if ($lastmovementdate)
{ {
print dol_print_date($lastmovementdate,'dayhour').' '; print dol_print_date($lastmovementdate,'dayhour').' ';
@ -800,7 +801,11 @@ if ((! empty($conf->productbatch->enabled)) && $object->hasbatch())
print '<td align="right" width="10%">'.$langs->trans("batch_number").'</td>'; print '<td align="right" width="10%">'.$langs->trans("batch_number").'</td>';
print '<td align="center" width="10%">'.$langs->trans("EatByDate").'</td>'; print '<td align="center" width="10%">'.$langs->trans("EatByDate").'</td>';
print '<td align="center" width="10%">'.$langs->trans("SellByDate").'</td>'; print '<td align="center" width="10%">'.$langs->trans("SellByDate").'</td>';
print '<td align="right" colspan="5"></td>'; print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '<td></td>';
print '</tr>'; print '</tr>';
} }

View File

@ -610,6 +610,7 @@ if ($action == 'create' && $user->rights->projet->creer)
// Other options // Other options
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
@ -834,6 +835,7 @@ elseif ($object->id > 0)
// Other options // Other options
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -42,7 +42,7 @@ $backtopage=GETPOST('backtopage','alpha');
$cancel=GETPOST('cancel'); $cancel=GETPOST('cancel');
$search_user_id = GETPOST('search_user_id', 'int'); $search_user_id = GETPOST('search_user_id', 'int');
//if (! $user->rights->projet->all->lire) $mine=1; // Special for projects //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects
$object = new Project($db); $object = new Project($db);
@ -97,7 +97,7 @@ if ($action == 'createtask' && $user->rights->projet->creer)
//$date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user'); //$date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear'],'user');
$date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']); $date_start = dol_mktime($_POST['dateohour'],$_POST['dateomin'],0,$_POST['dateomonth'],$_POST['dateoday'],$_POST['dateoyear']);
$date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']); $date_end = dol_mktime($_POST['dateehour'],$_POST['dateemin'],0,$_POST['dateemonth'],$_POST['dateeday'],$_POST['dateeyear']);
if (! $cancel) if (! $cancel)
{ {
if (empty($taskref)) if (empty($taskref))
@ -139,7 +139,7 @@ if ($action == 'createtask' && $user->rights->projet->creer)
$task->date_start = $date_start; $task->date_start = $date_start;
$task->date_end = $date_end; $task->date_end = $date_end;
$task->progress = $progress; $task->progress = $progress;
// Fill array 'array_options' with data from add form // Fill array 'array_options' with data from add form
$ret = $extrafields_task->setOptionalsFromPost($extralabels_task,$task); $ret = $extrafields_task->setOptionalsFromPost($extralabels_task,$task);
@ -224,26 +224,26 @@ if ($id > 0 || ! empty($ref))
if ($search_user_id > 0) $param.='&search_user_id='.dol_escape_htmltag($search_user_id); if ($search_user_id > 0) $param.='&search_user_id='.dol_escape_htmltag($search_user_id);
// Project card // Project card
$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
$morehtmlref='<div class="refidno">'; $morehtmlref='<div class="refidno">';
// Title // Title
$morehtmlref.=$object->title; $morehtmlref.=$object->title;
// Thirdparty // Thirdparty
if ($object->thirdparty->id > 0) if ($object->thirdparty->id > 0)
{ {
$morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project'); $morehtmlref.='<br>'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1, 'project');
} }
$morehtmlref.='</div>'; $morehtmlref.='</div>';
// Define a complementary filter for search of next/prev ref. // Define a complementary filter for search of next/prev ref.
if (! $user->rights->projet->all->lire) if (! $user->rights->projet->all->lire)
{ {
$objectsListId = $object->getProjectsAuthorizedForUser($user,0,0); $objectsListId = $object->getProjectsAuthorizedForUser($user,0,0);
$object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")"; $object->next_prev_filter=" rowid in (".(count($objectsListId)?join(',',array_keys($objectsListId)):'0').")";
} }
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
print '<div class="fichecenter">'; print '<div class="fichecenter">';
@ -286,7 +286,7 @@ if ($id > 0 || ! empty($ref))
print ($end?$end:'?'); print ($end?$end:'?');
if ($object->hasDelay()) print img_warning("Late"); if ($object->hasDelay()) print img_warning("Late");
print '</td></tr>'; print '</td></tr>';
// Budget // Budget
print '<tr><td>'.$langs->trans("Budget").'</td><td>'; print '<tr><td>'.$langs->trans("Budget").'</td><td>';
if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,1,0,0,$conf->currency); if (strcmp($object->budget_amount, '')) print price($object->budget_amount,'',$langs,1,0,0,$conf->currency);
@ -295,16 +295,16 @@ if ($id > 0 || ! empty($ref))
// Other attributes // Other attributes
$cols = 2; $cols = 2;
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php';
print '</table>'; print '</table>';
print '</div>'; print '</div>';
print '<div class="fichehalfright">'; print '<div class="fichehalfright">';
print '<div class="ficheaddleft">'; print '<div class="ficheaddleft">';
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Description // Description
print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>'; print '<td class="titlefield tdtop">'.$langs->trans("Description").'</td><td>';
print nl2br($object->description); print nl2br($object->description);
@ -316,13 +316,13 @@ if ($id > 0 || ! empty($ref))
print $form->showCategories($object->id,'project',1); print $form->showCategories($object->id,'project',1);
print "</td></tr>"; print "</td></tr>";
} }
print '</table>'; print '</table>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
print '</div>'; print '</div>';
print '<div class="clearboth"></div>'; print '<div class="clearboth"></div>';
@ -341,7 +341,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
print '<input type="hidden" name="action" value="createtask">'; print '<input type="hidden" name="action" value="createtask">';
print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
if (! empty($object->id)) print '<input type="hidden" name="id" value="'.$object->id.'">'; if (! empty($object->id)) print '<input type="hidden" name="id" value="'.$object->id.'">';
dol_fiche_head(''); dol_fiche_head('');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
@ -413,6 +413,7 @@ if ($action == 'create' && $user->rights->projet->creer && (empty($object->third
// Other options // Other options
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields_task->attribute_label)) if (empty($reshook) && ! empty($extrafields_task->attribute_label))
{ {
print $object->showOptionals($extrafields_task,'edit'); print $object->showOptionals($extrafields_task,'edit');
@ -460,7 +461,7 @@ else if ($id > 0 || ! empty($ref))
print '</div>'; print '</div>';
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">'; print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -470,12 +471,12 @@ else if ($id > 0 || ! empty($ref))
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
print '<input type="hidden" name="page" value="'.$page.'">'; print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">'; print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
$title=$langs->trans("ListOfTasks"); $title=$langs->trans("ListOfTasks");
$linktotasks='<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?projectid='.$object->id.'&withproject=1">'.$langs->trans("GoToListOfTimeConsumed").'</a>'; $linktotasks='<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?projectid='.$object->id.'&withproject=1">'.$langs->trans("GoToListOfTimeConsumed").'</a>';
//print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1); //print_barre_liste($title, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, $linktotasks, $num, $totalnboflines, 'title_generic.png', 0, '', '', 0, 1);
print load_fiche_titre($title,$linktotasks,'title_generic.png'); print load_fiche_titre($title,$linktotasks,'title_generic.png');
// Get list of tasks in tasksarray and taskarrayfiltered // Get list of tasks in tasksarray and taskarrayfiltered
// We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him). // We need all tasks (even not limited to a user because a task to user can have a parent that is not affected to him).
$filteronthirdpartyid = $socid; $filteronthirdpartyid = $socid;
@ -483,7 +484,7 @@ else if ($id > 0 || ! empty($ref))
// We load also tasks limited to a particular user // We load also tasks limited to a particular user
$tmpuser=new User($db); $tmpuser=new User($db);
if ($search_user_id > 0) $tmpuser->fetch($search_user_id); if ($search_user_id > 0) $tmpuser->fetch($search_user_id);
$tasksrole=($tmpuser->id > 0 ? $taskstatic->getUserRolesForProjectsOrTasks(0, $tmpuser, $object->id, 0) : ''); $tasksrole=($tmpuser->id > 0 ? $taskstatic->getUserRolesForProjectsOrTasks(0, $tmpuser, $object->id, 0) : '');
//var_dump($tasksarray); //var_dump($tasksarray);
//var_dump($tasksrole); //var_dump($tasksrole);
@ -494,7 +495,7 @@ else if ($id > 0 || ! empty($ref))
} }
print '<table id="tablelines" class="noborder" width="100%">'; print '<table id="tablelines" class="noborder" width="100%">';
if (count($tasksarray) > 0) if (count($tasksarray) > 0)
{ {
// Link to switch in "my task" / "all task" // Link to switch in "my task" / "all task"
@ -509,7 +510,7 @@ else if ($id > 0 || ! empty($ref))
print $searchpicto; print $searchpicto;
print '</td>'; print '</td>';
} }
print '<tr class="liste_titre nodrag nodrop">'; print '<tr class="liste_titre nodrag nodrop">';
// print '<td>'.$langs->trans("Project").'</td>'; // print '<td>'.$langs->trans("Project").'</td>';
print '<td width="100">'.$langs->trans("RefTask").'</td>'; print '<td width="100">'.$langs->trans("RefTask").'</td>';
@ -522,7 +523,7 @@ else if ($id > 0 || ! empty($ref))
print '<td align="right">'.$langs->trans("ProgressDeclared").'</td>'; print '<td align="right">'.$langs->trans("ProgressDeclared").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
if (count($tasksarray) > 0) if (count($tasksarray) > 0)
{ {
// Show all lines in taskarray (recursive function to go down on tree) // Show all lines in taskarray (recursive function to go down on tree)
@ -533,11 +534,11 @@ else if ($id > 0 || ! empty($ref))
{ {
print '<tr class="oddeven"><td colspan="9" class="opacitymedium">'.$langs->trans("NoTasks").'</td></tr>'; print '<tr class="oddeven"><td colspan="9" class="opacitymedium">'.$langs->trans("NoTasks").'</td></tr>';
} }
print "</table>"; print "</table>";
print '</form>'; print '</form>';
// Test if database is clean. If not we clean it. // Test if database is clean. If not we clean it.
//print 'mode='.$_REQUEST["mode"].' $nboftaskshown='.$nboftaskshown.' count($tasksarray)='.count($tasksarray).' count($tasksrole)='.count($tasksrole).'<br>'; //print 'mode='.$_REQUEST["mode"].' $nboftaskshown='.$nboftaskshown.' count($tasksarray)='.count($tasksarray).' count($tasksrole)='.count($tasksrole).'<br>';

View File

@ -408,6 +408,7 @@ if ($id > 0 || ! empty($ref))
// Other options // Other options
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -177,6 +177,7 @@ if (! $action)
// Other attributes // Other attributes
$parameters=array('objectsrc' => $objectsrc); $parameters=array('objectsrc' => $objectsrc);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -203,6 +203,7 @@ if ( $object->fetch($id) > 0 )
// Other attributes // Other attributes
$parameters=array('objectsrc' => $objectsrc); $parameters=array('objectsrc' => $objectsrc);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -174,7 +174,8 @@ if (! empty($socid))
$parameters=array('socid'=>$object->id); $parameters=array('socid'=>$object->id);
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$obj,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$obj,$action); // Note that $action and $object may have been modified by hook
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); print $hookmanager->resPrint;
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
$tmpuser->id = $obj->rowid; $tmpuser->id = $obj->rowid;
$tmpuser->firstname = $obj->firstname; $tmpuser->firstname = $obj->firstname;

View File

@ -1150,6 +1150,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters = array('colspan' => ' colspan="3"'); $parameters = array('colspan' => ' colspan="3"');
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (empty($reshook) && ! empty($extrafields->attribute_label)) {
print $object->showOptionals($extrafields, 'edit'); print $object->showOptionals($extrafields, 'edit');
} }

View File

@ -1112,6 +1112,7 @@ if ($action == 'create' || $action == 'adduserldap')
// Other attributes // Other attributes
$parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"'); $parameters=array('objectsrc' => $objectsrc, 'colspan' => ' colspan="3"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');

View File

@ -272,6 +272,7 @@ if ($action == 'create')
// Other attributes // Other attributes
$parameters=array('object' => $object, 'colspan' => ' colspan="2"'); $parameters=array('object' => $object, 'colspan' => ' colspan="2"');
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');
@ -562,6 +563,7 @@ else
// Other attributes // Other attributes
$parameters=array(); $parameters=array();
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook $reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (empty($reshook) && ! empty($extrafields->attribute_label)) if (empty($reshook) && ! empty($extrafields->attribute_label))
{ {
print $object->showOptionals($extrafields,'edit'); print $object->showOptionals($extrafields,'edit');