diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php
index bc1b58db592..0f417777417 100644
--- a/htdocs/compta/bank/various_payment/card.php
+++ b/htdocs/compta/bank/various_payment/card.php
@@ -377,7 +377,7 @@ if ($id)
{
$langs->load("projects");
$morehtmlref.=$langs->trans('Project') . ' ';
- if ($user->rights->tax->charges->creer)
+ if ($user->rights->banque->modifier)
{
if ($action != 'classify')
$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
@@ -396,9 +396,7 @@ if ($id)
if (! empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
- $morehtmlref.='';
- $morehtmlref.=$proj->ref;
- $morehtmlref.='';
+ $morehtmlref.=$proj->getNomUrl(1);
} else {
$morehtmlref.='';
}
diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php
index ea77b718544..c255ef19c16 100644
--- a/htdocs/compta/bank/various_payment/document.php
+++ b/htdocs/compta/bank/various_payment/document.php
@@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
// Load translation files required by the page
$langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
@@ -81,15 +82,15 @@ if ($object->id)
{
$head=various_payment_prepare_head($object);
- dol_fiche_head($head, 'documents', $langs->trans("VariousPayment"), 0, 'payment');
+ dol_fiche_head($head, 'documents', $langs->trans("VariousPayment"), -1, 'payment');
$morehtmlref='
';
// Project
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
- $morehtmlref.=$langs->trans('Project') . ' ';
- if ($user->rights->tax->charges->creer)
+ $morehtmlref.=$langs->trans('Project') . ' : ';
+ if ($user->rights->banque->modifier && 0)
{
if ($action != 'classify')
$morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
@@ -108,16 +109,14 @@ if ($object->id)
if (! empty($object->fk_project)) {
$proj = new Project($db);
$proj->fetch($object->fk_project);
- $morehtmlref.='
';
- $morehtmlref.=$proj->ref;
- $morehtmlref.='';
+ $morehtmlref.=$proj->getNomUrl(1);
} else {
$morehtmlref.='';
}
}
}
$morehtmlref.='
';
- $linkback = ''.$langs->trans("BackToList").'';
+ $linkback = ''.$langs->trans("BackToList").'';
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php
index c39a6379000..d9f8709b155 100644
--- a/htdocs/compta/bank/various_payment/info.php
+++ b/htdocs/compta/bank/various_payment/info.php
@@ -25,6 +25,7 @@ require '../../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
// Load translation files required by the page
$langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
@@ -49,9 +50,50 @@ $object->info($id);
$head = various_payment_prepare_head($object);
-dol_fiche_head($head, 'info', $langs->trans("VariousPayment"), 0, 'payment');
+dol_fiche_head($head, 'info', $langs->trans("VariousPayment"), -1, 'payment');
+$morehtmlref='';
+// Project
+if (! empty($conf->projet->enabled))
+{
+ $langs->load("projects");
+ $morehtmlref.=$langs->trans('Project') . ' : ';
+ if ($user->rights->banque->modifier && 0)
+ {
+ if ($action != 'classify')
+ $morehtmlref.='
' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : ';
+ if ($action == 'classify') {
+ //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
+ $morehtmlref.='
';
+ } else {
+ $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1);
+ }
+ } else {
+ if (! empty($object->fk_project)) {
+ $proj = new Project($db);
+ $proj->fetch($object->fk_project);
+ $morehtmlref.=$proj->getNomUrl(1);
+ } else {
+ $morehtmlref.='';
+ }
+ }
+}
+$morehtmlref.='
';
+$linkback = ''.$langs->trans("BackToList").'';
+
+dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright);
+
+print '';
+print '
';
+
+print '
';
+
print '
| ';
dol_print_object_info($object);
print ' |
';