';
@@ -356,14 +348,12 @@ if ($id)
}
// Other attributes
- $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','',$object,$action); // Note that $action and $object may have been modified by hook
print '
';
dol_fiche_end();
-
/*
* Action buttons
*/
diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index eb4ee3a2408..3c45ec77a89 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -671,4 +671,52 @@ class Tva extends CommonObject
return $result;
}
+ /**
+ * Informations of vat payment object
+ *
+ * @param int $id Id of vat payment
+ * @return int <0 if KO, >0 if OK
+ */
+ function info($id)
+ {
+ $sql = "SELECT t.rowid, t.tms as datec, t.fk_user_creat";
+ $sql.= " FROM ".MAIN_DB_PREFIX."tva as t";
+ $sql.= " WHERE t.rowid = ".$id;
+
+ dol_syslog(get_class($this)."::info", LOG_DEBUG);
+ $result=$this->db->query($sql);
+ if ($result)
+ {
+ if ($this->db->num_rows($result))
+ {
+ $obj = $this->db->fetch_object($result);
+
+ $this->id = $obj->rowid;
+
+ if ($obj->fk_user_creat) {
+ $cuser = new User($this->db);
+ $cuser->fetch($obj->fk_user_creat);
+ $this->user_creation = $cuser;
+ }
+
+ if ($obj->fk_user_modif) {
+ $muser = new User($this->db);
+ $muser->fetch($obj->fk_user_modif);
+ $this->user_modification = $muser;
+ }
+
+ $this->date_creation = $this->db->jdate($obj->datec);
+ $this->date_modification = $this->db->jdate($obj->datec);
+ $this->import_key = $obj->import_key;
+ }
+
+ $this->db->free($result);
+
+ }
+ else
+ {
+ dol_print_error($this->db);
+ }
+ }
+
}
diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php
new file mode 100644
index 00000000000..f85ab9fc2b0
--- /dev/null
+++ b/htdocs/compta/tva/info.php
@@ -0,0 +1,64 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file htdocs/compta/tva/info.php
+ * \ingroup tax
+ * \brief Page with info about vat
+ */
+
+require '../../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/vat.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
+
+$langs->load("compta");
+$langs->load("bills");
+
+$id=GETPOST('id','int');
+$action=GETPOST("action");
+
+// Security check
+$socid = GETPOST('socid','int');
+if ($user->societe_id) $socid=$user->societe_id;
+$result = restrictedArea($user, 'tax', '', '', 'charges');
+
+
+/*
+ * View
+ */
+$title=$langs->trans("VAT") . " - " . $langs->trans("Info");
+$help_url='';
+llxHeader("",$title,$helpurl);
+
+$object = new Tva($db);
+$object->fetch($id);
+$object->info($id);
+
+$head = vat_prepare_head($object);
+
+dol_fiche_head($head, 'info', $langs->trans("VATPayment"), 0, 'payment');
+
+print '
';
+dol_print_object_info($object);
+print '
';
+
+print '';
+
+llxFooter();
+
+$db->close();
diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php
index 7466c66df08..ac22841ad20 100644
--- a/htdocs/core/extrafieldsinexport.inc.php
+++ b/htdocs/core/extrafieldsinexport.inc.php
@@ -42,9 +42,11 @@ if ($resql) // This can fail when class is used on old database (during migra
if (preg_match('/[a-z0-9_]+:[a-z0-9_]+:[a-z0-9_]+/', $tmp)) $typeFilter="List:".$tmp;
break;
}
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
- $this->export_entities_array[$r][$fieldname]=$keyforelement;
+ if ($obj->type!='separate') {
+ $this->export_fields_array[$r][$fieldname]=$fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
+ $this->export_entities_array[$r][$fieldname]=$keyforelement;
+ }
}
}
// End add axtra fields
diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php
index fa80fe31a2b..f1748a0dfb9 100644
--- a/htdocs/core/lib/loan.lib.php
+++ b/htdocs/core/lib/loan.lib.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2015 Frederic France
+/* Copyright (C) 2014-2016 Alexandre Spangaro
+ * Copyright (C) 2015 Frederic France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -41,16 +41,6 @@ function loan_prepare_head($object)
$head[$tab][2] = 'card';
$tab++;
- if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
- {
- $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
- $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;
- $head[$tab][1] = $langs->trans("Notes");
- if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.'';
- $head[$tab][2] = 'note';
- $tab++;
- }
-
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
@@ -68,6 +58,16 @@ function loan_prepare_head($object)
$head[$tab][2] = 'documents';
$tab++;
+ if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
+ {
+ $nbNote = (empty($object->note_private)?0:1)+(empty($object->note_public)?0:1);
+ $head[$tab][0] = DOL_URL_ROOT."/loan/note.php?id=".$object->id;
+ $head[$tab][1] = $langs->trans("Notes");
+ if($nbNote > 0) $head[$tab][1].= ' '.$nbNote.'';
+ $head[$tab][2] = 'note';
+ $tab++;
+ }
+
$head[$tab][0] = DOL_URL_ROOT.'/loan/info.php?id='.$object->id;
$head[$tab][1] = $langs->trans("Info");
$head[$tab][2] = 'info';
diff --git a/htdocs/core/lib/vat.lib.php b/htdocs/core/lib/vat.lib.php
new file mode 100644
index 00000000000..9355bb1056e
--- /dev/null
+++ b/htdocs/core/lib/vat.lib.php
@@ -0,0 +1,57 @@
+
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file htdocs/core/lib/vat.lib.php
+ * \ingroup tax
+ * \brief Library for tax module (VAT)
+ */
+
+
+/**
+ * Prepare array with list of tabs
+ *
+ * @param Object $object Object related to tabs
+ * @return array Array of tabs to show
+ */
+function vat_prepare_head($object)
+{
+ global $db, $langs, $conf;
+
+ $tab = 0;
+ $head = array();
+
+ $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/card.php?id='.$object->id;
+ $head[$tab][1] = $langs->trans('Card');
+ $head[$tab][2] = 'card';
+ $tab++;
+
+ // Show more tabs from modules
+ // Entries must be declared in modules descriptor with line
+ // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
+ // $this->tabs = array('entity:-tabname); to remove a tab
+ complete_head_from_modules($conf, $langs, $object, $head, $tab,'vat');
+
+ $head[$tab][0] = DOL_URL_ROOT.'/compta/tva/info.php?id='.$object->id;
+ $head[$tab][1] = $langs->trans("Info");
+ $head[$tab][2] = 'info';
+ $tab++;
+
+ complete_head_from_modules($conf,$langs,$object,$head,$tab,'vat','remove');
+
+ return $head;
+}
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index 6ad1e4ff0e8..7206dc532a5 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -1427,26 +1427,6 @@ else
// Other attributes
//$cols = 3;
//include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php';
-
- // Public note
- print '