From 07d6464720e99e25b2f7433fe4a285d3f3a4e202 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 20 Mar 2014 06:38:07 +0100 Subject: [PATCH 1/3] Trips & expenses move into hrm area --- htdocs/compta/index.php | 69 ----------------------------------------- 1 file changed, 69 deletions(-) diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 9a7839fd1c3..d6833f628b7 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -528,75 +528,6 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire) else dol_print_error($db); } - -// Last trips and expenses -if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) -{ - include_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; - - $langs->load("boxes"); - - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, d.fk_statut, d.rowid, d.dated as date, d.tms as dm, d.km"; - $sql.= " FROM ".MAIN_DB_PREFIX."deplacement as d, ".MAIN_DB_PREFIX."user as u"; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE u.rowid = d.fk_user"; - $sql.= " AND d.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= " AND d.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) $sql.= " AND d.fk_soc = ".$socid; - $sql.= $db->order("d.tms","DESC"); - $sql.= $db->plimit($max, 0); - - $result = $db->query($sql); - if ($result) - { - $var=false; - $num = $db->num_rows($result); - - $i = 0; - - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if ($num) - { - $total_ttc = $totalam = $total = 0; - - $deplacementstatic=new Deplacement($db); - $userstatic=new User($db); - while ($i < $num && $i < $max) - { - $objp = $db->fetch_object($result); - $deplacementstatic->ref=$objp->rowid; - $deplacementstatic->id=$objp->rowid; - $userstatic->id=$objp->uid; - $userstatic->lastname=$objp->lastname; - $userstatic->firstname=$objp->firstname; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - $var=!$var; - $i++; - } - - } - else - { - print ''; - } - print '
'.$langs->trans("BoxTitleLastModifiedExpenses",$max).''.$langs->trans("FeesKilometersOrAmout").''.$langs->trans("DateModificationShort").' 
'.$deplacementstatic->getNomUrl(1).''.$userstatic->getNomUrl(1).''.$objp->km.''.dol_print_date($db->jdate($objp->dm),'day').''.$deplacementstatic->LibStatut($objp->fk_statut,3).'
'.$langs->trans("None").'

'; - } - else dol_print_error($db); -} - - /** * Social contributions to pay */ From bc48ddd3fcba428f3b7f5495ae8a381514fe600d Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 23 Mar 2014 16:33:05 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Pr=C3=A9sentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/paiement_charge.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 0b2cc3ea709..6b570f2eb5e 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -241,7 +241,7 @@ if ($_GET["action"] == 'create') print ''.$langs->trans("AmountTTC").''; print ''.$langs->trans("AlreadyPaid").''; print ''.$langs->trans("RemainderToPay").''; - print ''.$langs->trans("Amount").''; + print ''.$langs->trans("Amount").''; print "\n"; $var=True; @@ -274,7 +274,7 @@ if ($_GET["action"] == 'create') print ''.price($objp->amount-$sumpaid).""; - print ''; + print ''; if ($sumpaid < $objp->amount) { $namef = "amount_".$objp->id; From 79d8ce9d1ded4bdd69cb3ae444ee56e63e273512 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sat, 12 Apr 2014 10:00:28 +0200 Subject: [PATCH 3/3] Add tabs in bank card --- htdocs/core/lib/bank.lib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index 97169393376..1d669503f0d 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -78,6 +78,14 @@ function bank_prepare_head($object) $head[$h][2] = 'statement'; $h++; } + + // 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,$h,'bank'); + + complete_head_from_modules($conf,$langs,$object,$head,$h,'bank','remove'); return $head; }