From 9a36956619ff2c70e6b145b5131fc7b92365a7e8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 23 Jun 2012 20:48:50 +0200 Subject: [PATCH] New: Can filter list of proposal, order or invoice on sales representative --- ChangeLog | 6 +-- .../tpl/linesalesrepresentative.tpl.php | 39 +++++++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 htdocs/societe/tpl/linesalesrepresentative.tpl.php diff --git a/ChangeLog b/ChangeLog index ed4129eea4a..87a23df67c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -40,7 +40,7 @@ to make a backup of your database before making upgrade. For users: - New: Each user can remove/add its own boxes. - New: Add signature at end of predefined email text. -- New: Can use personalized fields of products/services. +- New: Can use personalized fields on products/services. - New: Can attach files on social contributions. - New: Show payments terms and conditions onto muscadet template. - New: Can open back a closed commercial proposal. @@ -58,7 +58,7 @@ For users: - New: task #10606 : more comprehensive message error. - New: task #11278 : Option into point of sale module to add services in list. - New: task #11261 : Add an entry into menu called "New shipment". -- New: [ task #187 ] Gerer les evenement recurrents dans les imports ical +- New: [ task #187 ] Gerer les evenement recurrents dans les imports ical. - New: Make option MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT available by default. - New: Can build PDF in USLetter format or canada format (change paper size). - New: Can export into Excel 2007 format. @@ -73,7 +73,7 @@ For users: - New: Reduce seriously size of packages. - New: Can define country code for import. - New: When invoice was generated from order, order date is visible on PDF, after order ref. -- New: [ task #181 ] Hide password of click2dial in user card +- New: [ task #181 ] Hide password of click2dial in user card. - New: Chart are faster to build - New: Value of data into charts are visible on mouse hover. - New: Import wizard can import contacts. diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php new file mode 100644 index 00000000000..63892395df7 --- /dev/null +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -0,0 +1,39 @@ +'; + print '
'; + print $langs->trans('SalesRepresentatives'); + print ''; + if ($user->rights->societe->creer) + print ''.img_edit().''; + else + print ' '; + print '
'; + print ''; + print ''; + + $listsalesrepresentatives=$object->getSalesRepresentatives($user); + $nbofsalesrepresentative=count($listsalesrepresentatives); + if ($nbofsalesrepresentative > 3) // We print only number + { + print ''; + print $nbofsalesrepresentative; + print ''; + } + else if ($nbofsalesrepresentative > 0) + { + $userstatic=new User($db); + $i=0; + foreach($listsalesrepresentatives as $val) + { + $userstatic->id=$val['id']; + $userstatic->lastname=$val['name']; + $userstatic->firstname=$val['firstname']; + print $userstatic->getNomUrl(1); + $i++; + if ($i < $nbofsalesrepresentative) print ', '; + } + } + else print $langs->trans("NoSalesRepresentativeAffected"); + print ''; +?> \ No newline at end of file