';
}
diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php
index 497de98fa72..66fab1b9279 100644
--- a/htdocs/compta/deplacement/list.php
+++ b/htdocs/compta/deplacement/list.php
@@ -80,7 +80,7 @@ $childids[]=$user->id;
llxHeader();
-$sql = "SELECT s.nom, s.rowid as socid,"; // Ou
+$sql = "SELECT s.nom, d.fk_user, s.rowid as socid,"; // Ou
$sql.= " d.rowid, d.type, d.dated as dd, d.km,"; // Comment
$sql.= " d.fk_statut,";
$sql.= " u.lastname, u.firstname"; // Qui
@@ -91,7 +91,7 @@ if (!$user->rights->societe->client->voir && !$socid) $sql.= " LEFT JOIN ".MAIN_
$sql.= " WHERE d.fk_user = u.rowid";
$sql.= " AND d.entity = ".$conf->entity;
if (empty($user->rights->deplacement->readall) && empty($user->rights->deplacement->lire_tous)) $sql.=' AND d.fk_user IN ('.join(',',$childids).')';
-if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND sc.fk_user = " .$user->id;
+if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND (sc.fk_user = " .$user->id." OR d.fk_soc IS NULL) ";
if ($socid) $sql.= " AND s.rowid = ".$socid;
if ($search_ref) $sql.=" AND d.rowid=".$search_ref;
@@ -188,7 +188,7 @@ if ($resql)
print '
';
}
// }
$db->free($result);
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index f1cae70fec5..2bcd227827e 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -962,7 +962,7 @@ class FactureRec extends CommonInvoice
if ($this->db->query($sql))
{
$this->date_when = $date;
- if ($increment_nb_gen_done>0) $_facrec->nb_gen_done++;
+ if ($increment_nb_gen_done>0) $this->nb_gen_done++;
return 1;
}
else
diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php
index 8118cbea1ac..7b2d7076aca 100644
--- a/htdocs/compta/facture/fiche-rec.php
+++ b/htdocs/compta/facture/fiche-rec.php
@@ -1269,7 +1269,7 @@ else
// Nb of generation already done
print '
';
@@ -1338,14 +1338,21 @@ else
//{
if ($user->rights->facture->creer)
{
- if (empty($object->frequency) || $object->date_when <= $today)
- {
- print '
';
- }
+ if (! empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max))
+ {
+ print '
';
+ }
+ else
+ {
+ if (empty($object->frequency) || $object->date_when <= $today)
+ {
+ print '
';
+ }
+ else
+ {
+ print '
';
+ }
+ }
}
else
{
@@ -1431,6 +1438,7 @@ else
$num = $db->num_rows($resql);
$param='&socid='.$socid;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($day) $param.='&day='.$day;
if ($month) $param.='&month='.$month;
diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php
index c6651b4810d..2bd9ce1d8a4 100644
--- a/htdocs/compta/facture/list.php
+++ b/htdocs/compta/facture/list.php
@@ -792,6 +792,7 @@ if ($resql)
}
$param='&socid='.$socid;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($day) $param.='&day='.$day;
if ($month) $param.='&month='.$month;
diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php
index 14f8c8d18f6..9ca0c2f7718 100644
--- a/htdocs/compta/facture/stats/index.php
+++ b/htdocs/compta/facture/stats/index.php
@@ -262,12 +262,12 @@ print '
';
print '
';
print '';
print ''.$langs->trans("Year").' ';
-print ''.$langs->trans("NumberOfBills").' ';
-print '% ';
-print ''.$langs->trans("AmountTotal").' ';
-print '% ';
-print ''.$langs->trans("AmountAverage").' ';
-print '% ';
+print ''.$langs->trans("NumberOfBills").' ';
+print '% ';
+print ''.$langs->trans("AmountTotal").' ';
+print '% ';
+print ''.$langs->trans("AmountAverage").' ';
+print '% ';
print ' ';
$oldyear=0;
diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php
index 719953204f9..ffb3b3631f1 100644
--- a/htdocs/compta/index.php
+++ b/htdocs/compta/index.php
@@ -543,7 +543,7 @@ if (! empty($conf->don->enabled) && $user->rights->societe->lire)
}
else
{
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
}
print '
';
}
@@ -614,7 +614,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire)
}
else
{
- print '
'.$langs->trans("None").' ';
+ print '
'.$langs->trans("None").' ';
}
print "
";
$db->free($resql);
diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php
index 1493ba1b99a..ebfd598ee0b 100644
--- a/htdocs/compta/paiement/cheque/list.php
+++ b/htdocs/compta/paiement/cheque/list.php
@@ -121,6 +121,7 @@ if ($resql)
$num = $db->num_rows($resql);
$i = 0;
$param='';
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
print '
'."\n";
}
- $out.= ''."\n";
-
if ($this->withform == 1) $out.= ''."\n";
// Disable enter key if option MAIN_MAILFORM_DISABLE_ENTERKEY is set
diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php
index a52238be1b9..6678d87ca60 100644
--- a/htdocs/core/class/html.formmargin.class.php
+++ b/htdocs/core/class/html.formmargin.class.php
@@ -255,7 +255,7 @@ class FormMargin
if (! empty($conf->product->enabled) && ! empty($conf->service->enabled))
{
- print '
';
+ print ' ';
print ''.$langs->trans('TotalMargin').' ';
print ''.price($marginInfo['pv_total'], null, null, null, null, $rounding).' ';
print ''.price($marginInfo['pa_total'], null, null, null, null, $rounding).' ';
diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php
index ad40ba84938..cdc45de825e 100644
--- a/htdocs/core/lib/agenda.lib.php
+++ b/htdocs/core/lib/agenda.lib.php
@@ -41,12 +41,13 @@
* @param int $socid Third party id
* @param string $action Action string
* @param array $showextcals Array with list of external calendars (used to show links to select calendar), or -1 to show no legend
- * @param string|array $actioncode Preselected value(s) of actioncode for filter on type
+ * @param string|array $actioncode Preselected value(s) of actioncode for filter on event type
* @param int $usergroupid Id of group to filter on users
- * @param string $excludetype A type to exclude ('systemauto', 'system', '')
+ * @param string $excludetype A type to exclude ('systemauto', 'system', '')
+ * @param int $resourceid Preselected value of resource for filter on resource
* @return void
*/
-function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid='', $excludetype='')
+function print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, $filtera, $filtert, $filterd, $pid, $socid, $action, $showextcals=array(), $actioncode='', $usergroupid='', $excludetype='', $resourceid=0)
{
global $conf, $user, $langs, $db, $hookmanager;
global $begin_h, $end_h, $begin_d, $end_d;
@@ -80,6 +81,20 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh
print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', ! $canedit);
print ' ';
+ if ($conf->resource->enabled)
+ {
+ include_once DOL_DOCUMENT_ROOT . '/resource/class/html.formresource.class.php';
+ $formresource=new FormResource($db);
+
+ // Resource
+ print '
';
+ print '';
+ print $langs->trans("Resource");
+ print ' ';
+ print $formresource->select_resource_list($resourceid, "resourceid", '', 1, 0, 0, null, '', 2);
+ print ' ';
+ }
+
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 4d51b703ef0..5b8bd70a566 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -551,7 +551,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
else
{
$var = false;
- print '
'.$langs->trans("None").' ';
+ print '
'.$langs->trans("None").' ';
}
$db->free($result);
}
@@ -766,7 +766,7 @@ function show_contacts($conf,$langs,$db,$object,$backtopage='')
else
{
print "
";
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
print " \n";
}
print "\n\n";
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 6cc3aa6ffb6..7ab372153dd 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -2981,10 +2981,11 @@ function print_fiche_titre($title, $mesg='', $picto='title_generic.png', $pictoi
* @param string $picto Icon to use before title (should be a 32x32 transparent png file)
* @param int $pictoisfullpath 1=Icon name is a full absolute url of image
* @param int $id To force an id on html objects
+ * @param string $morecssontable More css on table
* @return string
* @see print_barre_liste
*/
-function load_fiche_titre($titre, $mesg='', $picto='title_generic.png', $pictoisfullpath=0, $id=0)
+function load_fiche_titre($titre, $mesg='', $picto='title_generic.png', $pictoisfullpath=0, $id=0, $morecssontable='')
{
global $conf;
@@ -2994,7 +2995,7 @@ function load_fiche_titre($titre, $mesg='', $picto='title_generic.png', $pictois
if (($conf->browser->name == 'ie') && $picto=='title.png') $picto='title.gif';
$return.= "\n";
- $return.= '
';
+ $return.= '';
if ($picto) $return.= ''.img_picto('',$picto, 'id="pictotitle"', $pictoisfullpath).' ';
$return.= '';
$return.= ''.$titre.'
';
@@ -4135,8 +4136,7 @@ function yn($yesno, $case=1, $color=0)
/**
* Return a path to have a directory according to object.
* New usage: $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'modulepart')
- * Old usage: '001' with level 3->"0/0/1/", '015' with level 3->"0/1/5/"
- * Old usage: 'ABC-1' with level 3 ->"0/0/1/", '015' with level 1->"5/"
+ * Old usage: '015' with level 3->"0/1/5/", '015' with level 1->"5/", 'ABC-1' with level 3 ->"0/0/1/"
*
* @param string $num Id of object (deprecated, $object will be used in future)
* @param int $level Level of subdirs to return (1, 2 or 3 levels). (deprecated, global option will be used in future)
@@ -5342,6 +5342,11 @@ function printCommonFooter($zone='private')
});'."\n";
print '});'."\n";
+ print ''."\n";
+ print 'jQuery(".menuhider").click(function() {';
+ print " $('.side-nav').toggle(); ";
+ print '});'."\n";
+
print ''."\n";
}
diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php
index 9dbb2a9664b..fa80fe31a2b 100644
--- a/htdocs/core/lib/loan.lib.php
+++ b/htdocs/core/lib/loan.lib.php
@@ -41,15 +41,15 @@ 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++;
- }
+ 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
diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php
index 621cf800d99..58fffbae5b7 100644
--- a/htdocs/core/lib/resource.lib.php
+++ b/htdocs/core/lib/resource.lib.php
@@ -42,8 +42,10 @@ function resource_prepare_head($object)
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
{
- $head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id;
- $head[$h][1] = $langs->trans('Contact');
+ $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
+ $head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id;
+ $head[$h][1] = $langs->trans('ContactsAddresses');
+ if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
$head[$h][2] = 'contact';
$h++;
}
diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php
index 52e0b9b9e96..2c362a42c2c 100644
--- a/htdocs/core/lib/sendings.lib.php
+++ b/htdocs/core/lib/sendings.lib.php
@@ -62,11 +62,16 @@ function shipping_prepare_head($object)
}
}
- $head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id;
- $head[$h][1] = $langs->trans("ContactsAddresses");
- $head[$h][2] = 'contact';
- $h++;
-
+ if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
+ {
+ $nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external'));
+ $head[$h][0] = DOL_URL_ROOT."/expedition/contact.php?id=".$object->id;
+ $head[$h][1] = $langs->trans("ContactsAddresses");
+ if ($nbContact > 0) $head[$h][1].= ' '.$nbContact.' ';
+ $head[$h][2] = 'contact';
+ $h++;
+ }
+
$nbNote = 0;
if (!empty($object->note_private)) $nbNote++;
if (!empty($object->note_public)) $nbNote++;
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 6f91bfe4325..d44e1f50775 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -54,7 +54,7 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
if (GETPOST('testmenuhider') && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER))
{
$showmode=1;
- $classname = 'class="tmenu"';
+ $classname = 'class="tmenu menuhider"';
$idsel='menu';
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
@@ -1425,13 +1425,18 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
{
$altok++;
$blockvmenuopened=true;
+ $lastopened=true;
+ for($j = ($i + 1); $j < $num; $j++)
+ {
+ if (empty($menu_array[$j]['level'])) $lastopened=false;
+ }
if ($altok % 2 == 0)
{
- print '
';
diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php
index dd775662db6..7b2a6f43f4d 100644
--- a/htdocs/core/tpl/resource_view.tpl.php
+++ b/htdocs/core/tpl/resource_view.tpl.php
@@ -5,34 +5,33 @@
$form= new Form($db);
+print '';
+
+if($mode == 'edit' )
+{
+ print '
';
+}
+else
+{
+ print '
';
+}
+
if( (array) $linked_resources && count($linked_resources) > 0)
{
$var=true;
- print '
';
-
- if($mode == 'edit' )
- {
- print '
';
- }
- else
- {
- print '
';
- }
-
-
foreach ($linked_resources as $linked_resource)
{
$var=!$var;
@@ -56,7 +55,6 @@ if( (array) $linked_resources && count($linked_resources) > 0)
print '
'.$form->selectyesno('mandatory',$linked_resource['mandatory']?1:0,1).'
';
print '
';
print '';
-
}
else
{
@@ -96,11 +94,13 @@ if( (array) $linked_resources && count($linked_resources) > 0)
}
}
- print '
';
}
else {
- print '
'.$langs->trans('NoResourceLinked').'
';
+ print '
'.$langs->trans('NoResourceLinked').'
';
}
+
+print '
';
+
?>
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index 32481d0bfdd..40e9c516ea8 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -256,7 +256,8 @@ if ($resql)
$expedition = new Expedition($db);
$param='';
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_ref_exp) $param.= "&search_ref_exp=".$search_ref_exp;
if ($search_ref_liv) $param.= "&search_ref_liv=".$search_ref_liv;
if ($search_company) $param.= "&search_company=".$search_company;
diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php
index ff6434154c6..f046b4ea61f 100644
--- a/htdocs/expensereport/card.php
+++ b/htdocs/expensereport/card.php
@@ -1401,6 +1401,7 @@ else
print ''.$langs->trans("NotePrivate").' ';
print ''.$object->note_private.' ';
print ' ';
+ // Amount
print '';
print ''.$langs->trans("AmountHT").' ';
print ''.price($object->total_ht).' ';
@@ -1412,9 +1413,8 @@ else
if($object->fk_statut==6) $rowspan+=2;
print '';
- /*
- * Payments
- */
+
+ // List of payments
$sql = "SELECT p.rowid, p.num_payment, p.datep as dp, p.amount,";
$sql.= "c.code as type_code,c.libelle as payment_type";
$sql.= " FROM ".MAIN_DB_PREFIX."payment_expensereport as p";
@@ -1499,9 +1499,13 @@ else
}
print ' ';
+ // Validation date
print '';
print ''.$langs->trans("DATE_SAVE").' ';
- print ''.dol_print_date($object->date_create,'dayhour').' ';
+ print ''.dol_print_date($object->date_create,'dayhour');
+ if ($object->status == 2 && $object->hasDelay('toapprove')) print ' '.img_warning($langs->trans("Late"));
+ if ($object->status == 5 && $object->hasDelay('topay')) print ' '.img_warning($langs->trans("Late"));
+ print ' ';
print '';
// User to inform
@@ -1515,7 +1519,11 @@ else
$userfee=new User($db);
$userfee->fetch($object->fk_user_validator);
print $userfee->getNomUrl(1);
- if (empty($userfee->email) || ! isValidEmail($userfee->email)) print img_warning($langs->trans("EmailNotValid"));
+ if (empty($userfee->email) || ! isValidEmail($userfee->email))
+ {
+ $langs->load("errors");
+ print img_warning($langs->trans("ErrorBadEMail", $userfee->email));
+ }
}
print '';
}
diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php
index 6394b977908..f0467648af8 100644
--- a/htdocs/expensereport/class/expensereport.class.php
+++ b/htdocs/expensereport/class/expensereport.class.php
@@ -1613,6 +1613,28 @@ class ExpenseReport extends CommonObject
return -1;
}
}
+
+ /**
+ * Return if an expense report is late or not
+ *
+ * @param string $option 'topay' or 'toapprove'
+ * @return boolean True if late, False if not late
+ */
+ public function hasDelay($option)
+ {
+ global $conf;
+
+ //Only valid members
+ if ($option == 'toapprove' && $this->status != 2) return false;
+ if ($option == 'topay' && $this->status != 5) return false;
+
+ $now = dol_now();
+
+ if ($option == 'toapprove')
+ return $this->datevalid < ($now - $conf->expensereport->approve->warning_delay);
+ else
+ return $this->datevalid < ($now - $conf->expensereport->payment->warning_delay);
+ }
}
diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php
index b980199c800..117ecc5e3c4 100644
--- a/htdocs/expensereport/index.php
+++ b/htdocs/expensereport/index.php
@@ -201,7 +201,7 @@ if ($result)
}
else
{
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
}
print '
';
}
diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php
index b7f5be64455..8175c130ef6 100644
--- a/htdocs/expensereport/list.php
+++ b/htdocs/expensereport/list.php
@@ -81,7 +81,6 @@ $fieldstosearchall = array(
$form = new Form($db);
$formother = new FormOther($db);
-$expensereporttmp=new ExpenseReport($db);
llxHeader('', $langs->trans("ListOfTrips"));
@@ -104,7 +103,7 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
$sql = "SELECT d.rowid, d.ref, d.fk_user_author, d.total_ht, d.total_tva, d.total_ttc, d.fk_statut as status,";
-$sql.= " d.date_debut, d.date_fin,";
+$sql.= " d.date_debut, d.date_fin, d.date_valid,";
$sql.= " u.rowid as id_user, u.firstname, u.lastname";
$sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d";
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON d.fk_user_author = u.rowid";
@@ -244,7 +243,8 @@ if ($resql)
print '';
// User
- if ($user->rights->expensereport->readall || $user->rights->expensereport->lire_tous){
+ if ($user->rights->expensereport->readall || $user->rights->expensereport->lire_tous)
+ {
print '
';
print $form->select_dolusers($search_user, 'search_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300');
print ' ';
@@ -280,7 +280,7 @@ if ($resql)
$expensereportstatic=new ExpenseReport($db);
- if($num > 0)
+ if ($num > 0)
{
while ($i < min($num,$limit))
{
@@ -288,21 +288,27 @@ if ($resql)
$expensereportstatic->id=$objp->rowid;
$expensereportstatic->ref=$objp->ref;
+ $expensereportstatic->status=$objp->status;
+ $expensereportstatic->valid=$objp->date_valid;
+ $expensereportstatic->date_debut=$objp->date_debut;
+ $expensereportstatic->date_fin=$objp->date_fin;
$var=!$var;
print "
";
- print ''.$expensereportstatic->getNomUrl(1).' ';
+ print '';
+ print $expensereportstatic->getNomUrl(1);
+ print $expensereportstatic->status;
+ if ($expensereportstatic->status == 2 && $expensereportstatic->hasDelay('toappove')) print img_warning($langs->trans("Late"));
+ if ($expensereportstatic->status == 5 && $expensereportstatic->hasDelay('topay')) print img_warning($langs->trans("Late"));
+ print ' ';
print ''.($objp->date_debut > 0 ? dol_print_date($objp->date_debut, 'day') : '').' ';
print ''.($objp->date_fin > 0 ? dol_print_date($objp->date_fin, 'day') : '').' ';
print ''.img_object($langs->trans("ShowUser"),"user").' '.dolGetFirstLastname($objp->firstname, $objp->lastname).' ';
print ''.price($objp->total_ht).' ';
print ''.price($objp->total_tva).' ';
print ''.price($objp->total_ttc).' ';
-
- $expensereporttmp->status=$objp->status;
print '';
- //print $objp->status;
- print $expensereporttmp->getLibStatut(5);
+ print $expensereportstatic->getLibStatut(5);
print ' ';
print ' ';
diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php
index 6c515192f78..675d800145b 100644
--- a/htdocs/expensereport/stats/index.php
+++ b/htdocs/expensereport/stats/index.php
@@ -241,9 +241,9 @@ print ' ';
print '';
print '';
print ''.$langs->trans("Year").' ';
-print ''.$langs->trans("Number").' ';
-print ''.$langs->trans("AmountTotal").' ';
-print ''.$langs->trans("AmountAverage").' ';
+print ''.$langs->trans("Number").' ';
+print ''.$langs->trans("AmountTotal").' ';
+print ''.$langs->trans("AmountAverage").' ';
print ' ';
$oldyear=0;
diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php
index 88224a487cf..81121f3b4bf 100644
--- a/htdocs/fichinter/list.php
+++ b/htdocs/fichinter/list.php
@@ -141,7 +141,8 @@ if ($result)
$num = $db->num_rows($result);
$param='';
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($socid) $param.="&socid=".$socid;
if ($search_ref) $param.="&search_ref=".urlencode($search_ref);
if ($search_company) $param.="&search_company=".urlencode($search_company);
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index 8c533f0f547..3c8ad35e141 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -31,6 +31,7 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
+require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
@@ -343,6 +344,78 @@ if ($object->id > 0)
print '
';
}
+
+ /*
+ * Last supplier proposal
+ */
+ $proposalstatic = new SupplierProposal($db);
+
+ if ($user->rights->supplier_proposal->lire)
+ {
+ $sql = "SELECT p.rowid, p.ref, p.date_valid as dc, p.fk_statut, p.total_ht, p.tva as total_tva, p.total as total_ttc";
+ $sql.= " FROM ".MAIN_DB_PREFIX."supplier_proposal as p ";
+ $sql.= " WHERE p.fk_soc =".$object->id;
+ $sql.= " AND p.entity =".$conf->entity;
+ $sql.= " ORDER BY p.date_valid DESC";
+ $sql.= " ".$db->plimit($MAXLIST);
+
+ $resql=$db->query($sql);
+ if ($resql)
+ {
+ $i = 0 ;
+ $num = $db->num_rows($resql);
+
+ if ($num > 0)
+ {
+ print '';
+
+ print '';
+ print '';
+ print '';
+ print ' ';
+ }
+
+ $var = True;
+ while ($i < $num && $i <= $MAXLIST)
+ {
+ $obj = $db->fetch_object($resql);
+ $var=!$var;
+
+ print "";
+ print '';
+ $proposalstatic->id = $obj->rowid;
+ $proposalstatic->ref = $obj->ref;
+ $proposalstatic->total_ht = $obj->total_ht;
+ $proposalstatic->total_tva = $obj->total_tva;
+ $proposalstatic->total_ttc = $obj->total_ttc;
+ print $proposalstatic->getNomUrl(1);
+ print ' ';
+ print '';
+ if ($obj->dc)
+ {
+ print dol_print_date($db->jdate($obj->dc),'day');
+ }
+ else
+ {
+ print "-";
+ }
+ print ' ';
+ print ''.$proposalstatic->LibStatut($obj->fk_statut,5).' ';
+ print ' ';
+ $i++;
+ }
+ $db->free($resql);
+
+ if ($num >0) print "
";
+ }
+ else
+ {
+ dol_print_error($db);
+ }
+ }
/*
* Last supplier orders
@@ -441,7 +514,6 @@ if ($object->id > 0)
/*
* Last supplier invoices
*/
- $MAXLIST=5;
$langs->load('bills');
$facturestatic = new FactureFournisseur($db);
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index 5febca7cf15..8b56e12d8cc 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -29,6 +29,7 @@
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
@@ -396,6 +397,7 @@ if ($resql)
$param='';
if ($socid > 0) $param.='&socid='.$socid;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($orderday) $param.='&orderday='.$orderday;
if ($ordermonth) $param.='&ordermonth='.$ordermonth;
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 43e5786cbc3..f078c714416 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1957,7 +1957,7 @@ else
}
else
{
- print ' '.$langs->trans("None").' ';
+ print '
'.$langs->trans("None").' ';
}
if ($object->paye == 0)
diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php
index 5d29468090e..5f004f15e09 100644
--- a/htdocs/hrm/admin/admin_establishment.php
+++ b/htdocs/hrm/admin/admin_establishment.php
@@ -129,7 +129,7 @@ if ($result)
}
else
{
- print '
'.$langs->trans("None").' ';
+ print '
'.$langs->trans("None").' ';
}
print '';
diff --git a/htdocs/hrm/hrm.php b/htdocs/hrm/hrm.php
index bce42359453..cc2366d7e4c 100644
--- a/htdocs/hrm/hrm.php
+++ b/htdocs/hrm/hrm.php
@@ -207,7 +207,7 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
}
else
{
- print '
'.$langs->trans("None").' ';
+ print '
'.$langs->trans("None").' ';
}
print '
';
}
@@ -272,7 +272,7 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire)
}
else
{
- print '
'.$langs->trans("None").' ';
+ print '
'.$langs->trans("None").' ';
}
print '
';
}
@@ -336,7 +336,7 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire
}
else
{
- print '
'.$langs->trans("None").' ';
+ print '
'.$langs->trans("None").' ';
}
print '
';
}
diff --git a/htdocs/index.php b/htdocs/index.php
index b28038e63c9..2a524d56078 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -473,7 +473,7 @@ if (! empty($conf->banque->enabled) && $user->rights->banque->lire && ! $user->s
{
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$board=new Account($db);
- $nb = $board::countAccountToReconcile();
+ $nb = $board::countAccountToReconcile(); // Get nb of account to reconciliate
if ($nb > 0)
{
$dashboardlines[] = $board->load_board($user);
diff --git a/htdocs/install/mysql/data/llx_c_type_contact.sql b/htdocs/install/mysql/data/llx_c_type_contact.sql
index 4acc8e467c5..a0b36634ce1 100644
--- a/htdocs/install/mysql/data/llx_c_type_contact.sql
+++ b/htdocs/install/mysql/data/llx_c_type_contact.sql
@@ -64,11 +64,14 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (130, 'fichinter','external', 'BILLING', 'Contact client facturation intervention', 1);
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (131, 'fichinter','external', 'CUSTOMER', 'Contact client suivi de l''intervention', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (140,'order_supplier','internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (141,'order_supplier','internal', 'SHIPPING', 'Responsable rƩception de la commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (142,'order_supplier','external', 'BILLING', 'Contact fournisseur facturation commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (143,'order_supplier','external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1);
-insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (145,'order_supplier','external', 'SHIPPING', 'Contact fournisseur livraison commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (140, 'order_supplier','internal', 'SALESREPFOLL', 'Responsable suivi de la commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (141, 'order_supplier','internal', 'SHIPPING', 'Responsable rƩception de la commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (142, 'order_supplier','external', 'BILLING', 'Contact fournisseur facturation commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (143, 'order_supplier','external', 'CUSTOMER', 'Contact fournisseur suivi commande', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (145, 'order_supplier','external', 'SHIPPING', 'Contact fournisseur livraison commande', 1);
+
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (150, 'dolresource','internal', 'USERINCHARGE', 'In charge of resource', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (151, 'dolresource','external', 'THIRDINCHARGE', 'In charge of resource', 1);
-- All project code must start with 'PROJECT'
insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (160, 'project', 'internal', 'PROJECTLEADER', 'Chef de Projet', 1);
diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
index 4aae6de71e6..c20ef305c39 100644
--- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
+++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql
@@ -39,6 +39,9 @@ ALTER TABLE llx_opensurvey_sondage ADD COLUMN status integer DEFAULT 1 after dat
ALTER TABLE llx_expedition ADD COLUMN billed smallint DEFAULT 0;
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (150, 'dolresource','internal', 'USERINCHARGE', 'In charge of resource', 1);
+insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (151, 'dolresource','external', 'THIRDINCHARGE', 'In charge of resource', 1);
+
-- DROP TABLE llx_product_lot;
CREATE TABLE llx_product_lot (
rowid integer AUTO_INCREMENT PRIMARY KEY,
@@ -116,6 +119,7 @@ ALTER TABLE llx_facturedet ADD COLUMN fk_contract_line integer NULL AFTER rang;
ALTER TABLE llx_facturedet_rec ADD COLUMN import_key varchar(14);
ALTER TABLE llx_chargesociales ADD COLUMN import_key varchar(14);
+ALTER TABLE llx_tva ADD COLUMN import_key varchar(14);
--DROP TABLE llx_website_page;
--DROP TABLE llx_website;
diff --git a/htdocs/install/mysql/tables/llx_tva.sql b/htdocs/install/mysql/tables/llx_tva.sql
index c5b1542198c..f33280ff511 100644
--- a/htdocs/install/mysql/tables/llx_tva.sql
+++ b/htdocs/install/mysql/tables/llx_tva.sql
@@ -30,14 +30,7 @@ create table llx_tva
entity integer DEFAULT 1 NOT NULL, -- multi company id
note text,
fk_bank integer,
- fk_user_creat integer, -- utilisateur qui a cree l'info
- fk_user_modif integer -- utilisateur qui a modifiļæ½ l'info
+ fk_user_creat integer, -- utilisateur who create record
+ fk_user_modif integer, -- utilisateur who modify record
+ import_key varchar(14)
)ENGINE=innodb;
-
---
--- List of codes for the field entity
---
--- 1 : first company vat
--- 2 : second company vat
--- 3 : etc...
---
\ No newline at end of file
diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang
index 20640733cd4..993570f4790 100644
--- a/htdocs/langs/en_US/accountancy.lang
+++ b/htdocs/langs/en_US/accountancy.lang
@@ -3,9 +3,9 @@ ACCOUNTING_EXPORT_SEPARATORCSV=Column separator for export file
ACCOUNTING_EXPORT_DATE=Date format for export file
ACCOUNTING_EXPORT_PIECE=Export the number of piece
ACCOUNTING_EXPORT_GLOBAL_ACCOUNT=Export with global account
-ACCOUNTING_EXPORT_LABEL=Export the label
-ACCOUNTING_EXPORT_AMOUNT=Export the amount
-ACCOUNTING_EXPORT_DEVISE=Export the devise
+ACCOUNTING_EXPORT_LABEL=Export label
+ACCOUNTING_EXPORT_AMOUNT=Export amount
+ACCOUNTING_EXPORT_DEVISE=Export currency
Selectformat=Select the format for the file
ACCOUNTING_EXPORT_PREFIX_SPEC=Specify the prefix for the file name
@@ -183,4 +183,4 @@ Formula=Formula
## Error
ErrorNoAccountingCategoryForThisCountry=No accounting category are available for this country
-ExportNotSupported=The export format setuped is not supported into this page
\ No newline at end of file
+ExportNotSupported=The export format setuped is not supported into this page
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index f8942c406a9..c2893c0dbcc 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -225,5 +225,6 @@ BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Based on t
SameCountryCustomersWithVAT=National customers report
BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Based on the two first letters of the VAT number being the same as your own company's country code
LinkedFichinter=Link to an intervention
-ImportDataset_tax_1=Import social/fiscal taxes
+ImportDataset_tax_contrib=Import social/fiscal taxes
+ImportDataset_tax_vat=Import vat payments
ErrorBankAccountNotFound=Error: Bank account not found
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index fef4e55ad21..1ee858aa23d 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -142,7 +142,7 @@ Update=Update
AddActionToDo=Add event to do
AddActionDone=Add event done
Close=Close
-CloseBox=Remove box from your dashboard
+CloseBox=Remove widget from your dashboard
Confirm=Confirm
ConfirmSendCardByMail=Do you really want to send content of this card by mail to
%s ?
Delete=Delete
@@ -611,7 +611,7 @@ RecordsModified=%s records modified
AutomaticCode=Automatic code
NotManaged=Not managed
FeatureDisabled=Feature disabled
-MoveBox=Move box %s
+MoveBox=Move widget
Offered=Offered
NotEnoughPermissions=You don't have permission for this action
SessionName=Session name
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index c1ba6f73159..c0f304bce35 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -97,7 +97,8 @@ SelectWarehouseForStockDecrease=Choose warehouse to use for stock decrease
SelectWarehouseForStockIncrease=Choose warehouse to use for stock increase
NoStockAction=No stock action
LastWaitingSupplierOrders=Orders waiting for receptions
-DesiredStock=Desired minimum stock
+DesiredStock=Desired optimal stock
+DesiredStockDesc=This stock amount will be the value used to fill the stock by replenishment feature.
DesiredMaxStock=Desired maximum stock
StockToBuy=To order
Replenishment=Replenishment
diff --git a/htdocs/langs/en_US/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang
index 988e377d4df..394d4cabe01 100644
--- a/htdocs/langs/en_US/supplier_proposal.lang
+++ b/htdocs/langs/en_US/supplier_proposal.lang
@@ -59,3 +59,5 @@ DefaultModelSupplierProposalClosed=Default template when closing a price request
ListOfSupplierProposal=List of supplier proposal requests
SupplierProposalsToClose=Supplier proposals to close
SupplierProposalsToProcess=Supplier proposals to process
+LastSupplierProposals=Last price requests
+AllPriceRequests=All requests
\ No newline at end of file
diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php
index 116de7c561d..31de81d8b9b 100644
--- a/htdocs/loan/card.php
+++ b/htdocs/loan/card.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2014-2016 Alexandre Spangaro
* Copyright (C) 2015 Frederic France
*
* This program is free software; you can redistribute it and/or modify
@@ -26,6 +26,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
+if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
+if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/html.formventilation.class.php';
$langs->load("compta");
$langs->load("bills");
@@ -104,19 +106,23 @@ if ($action == 'add' && $user->rights->loan->write)
}
else
{
- $object->label = $_POST["label"];
- $object->fk_bank = $_POST["accountid"];
- $object->capital = $_POST["capital"];
- $object->datestart = $datestart;
- $object->dateend = $dateend;
- $object->nbterm = $_POST["nbterm"];
- $object->rate = $_POST["rate"];
- $object->note_private = GETPOST('note_private');
- $object->note_public = GETPOST('note_public');
+ $object->label = $_POST["label"];
+ $object->fk_bank = $_POST["accountid"];
+ $object->capital = $_POST["capital"];
+ $object->datestart = $datestart;
+ $object->dateend = $dateend;
+ $object->nbterm = $_POST["nbterm"];
+ $object->rate = $_POST["rate"];
+ $object->note_private = GETPOST('note_private');
+ $object->note_public = GETPOST('note_public');
- $object->account_capital = $_POST["accountancy_account_capital"];
- $object->account_insurance = $_POST["accountancy_account_insurance"];
- $object->account_interest = $_POST["accountancy_account_interest"];
+ $accountancy_account_capital = GETPOST('accountancy_account_capital');
+ $accountancy_account_insurance = GETPOST('accountancy_account_insurance');
+ $accountancy_account_interest = GETPOST('accountancy_account_interest');
+
+ if ($accountancy_account_capital <= 0) { $object->account_capital = ''; } else { $object->account_capital = $accountancy_account_capital; }
+ if ($accountancy_account_insurance <= 0) { $object->account_insurance = ''; } else { $object->account_insurance = $accountancy_account_insurance; }
+ if ($accountancy_account_interest <= 0) { $object->account_interest = ''; } else { $object->account_interest = $accountancy_account_interest; }
$id=$object->create($user);
if ($id <= 0)
@@ -172,6 +178,7 @@ else if ($action == 'update' && $user->rights->loan->write)
*/
$form = new Form($db);
+if (! empty($conf->accounting->enabled)) $formaccountancy = New FormVentilation($db);
$help_url='EN:Module_Loan|FR:Module_Emprunt';
llxHeader("",$langs->trans("Loan"),$help_url);
@@ -253,27 +260,50 @@ if ($action == 'create')
print '';
+ print ' ';
+
+ print '';
// Accountancy
- if ($conf->accounting->enabled)
+ if (! empty($conf->accounting->enabled))
{
- print ' ';
-
- print '';
-
+ // Accountancy_account_capital
+ print ''.$langs->trans("LoanAccountancyCapitalCode").' ';
+ print '';
+ print $formaccountancy->select_account($object->accountancy_account_capital, 'accountancy_account_capital', 1, '', 0, 1);
+ print ' ';
+
+ // Accountancy_account_insurance
+ print ''.$langs->trans("LoanAccountancyInsuranceCode").' ';
+ print '';
+ print $formaccountancy->select_account($object->accountancy_account_insurance, 'accountancy_account_insurance', 1, '', 0, 1);
+ print ' ';
+
+ // Accountancy_account_interest
+ print ''.$langs->trans("LoanAccountancyInterestCode").' ';
+ print '';
+ print $formaccountancy->select_account($object->accountancy_account_interest, 'accountancy_account_interest', 1, '', 0, 1);
+ print ' ';
+ }
+ else // For external software
+ {
+ // Accountancy_account_capital
print ''.$langs->trans("LoanAccountancyCapitalCode").' ';
print ' ';
print ' ';
-
+
+ // Accountancy_account_insurance
print ''.$langs->trans("LoanAccountancyInsuranceCode").' ';
print ' ';
print ' ';
-
+
+ // Accountancy_account_interest
print ''.$langs->trans("LoanAccountancyInterestCode").' ';
print ' ';
print ' ';
print '
';
}
+ print '
';
dol_fiche_end();
@@ -375,6 +405,39 @@ if ($id > 0)
// Note Public
print ''.$langs->trans('NotePublic').' '.nl2br($object->note_public).' ';
+ // Accountancy account capital
+ print '';
+ print $langs->trans("LoanAccountancyCapitalCode");
+ print ' ';
+ if (! empty($conf->accounting->enabled)) {
+ print length_accountg($object->account_capital);
+ } else {
+ print $object->account_capital;
+ }
+ print ' ';
+
+ // Accountancy account insurance
+ print '';
+ print $langs->trans("LoanAccountancyInsuranceCode");
+ print ' ';
+ if (! empty($conf->accounting->enabled)) {
+ print length_accountg($object->account_insurance);
+ } else {
+ print $object->account_insurance;
+ }
+ print ' ';
+
+ // Accountancy account interest
+ print '';
+ print $langs->trans("LoanAccountancyInterestCode");
+ print ' ';
+ if (! empty($conf->accounting->enabled)) {
+ print length_accountg($object->account_interest);
+ } else {
+ print $object->account_interest;
+ }
+ print ' ';
+
// Status
print ''.$langs->trans("Status").' '.$object->getLibStatut(4, $totalpaye).' ';
@@ -444,13 +507,11 @@ if ($id > 0)
print ''.price($objp->amount_interest, 0, $langs, 0, 0, -1, $conf->currency)." \n";
print ''.price($objp->amount_capital, 0, $langs, 0, 0, -1, $conf->currency)." \n";
print "";
- $total_insurance += $objp->amount_insurance;
- $total_interest += $objp->amount_interest;
$total_capital += $objp->amount_capital;
$i++;
}
- $totalpaid = $total_insurance + $total_interest + $total_capital;
+ $totalpaid = $total_capital;
if ($object->paid == 0)
{
diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php
index 66809b60720..60d4050148a 100644
--- a/htdocs/loan/class/loan.class.php
+++ b/htdocs/loan/class/loan.class.php
@@ -72,7 +72,7 @@ class Loan extends CommonObject
function fetch($id)
{
$sql = "SELECT l.rowid, l.label, l.capital, l.datestart, l.dateend, l.nbterm, l.rate, l.note_private, l.note_public,";
- $sql.= " l.paid";
+ $sql.= " l.paid, l.accountancy_account_capital, l.accountancy_account_insurance, l.accountancy_account_interest";
$sql.= " FROM ".MAIN_DB_PREFIX."loan as l";
$sql.= " WHERE l.rowid = ".$id;
@@ -84,17 +84,22 @@ class Loan extends CommonObject
{
$obj = $this->db->fetch_object($resql);
- $this->id = $obj->rowid;
- $this->ref = $obj->rowid;
- $this->datestart = $this->db->jdate($obj->datestart);
- $this->dateend = $this->db->jdate($obj->dateend);
- $this->label = $obj->label;
- $this->capital = $obj->capital;
- $this->nbterm = $obj->nbterm;
- $this->rate = $obj->rate;
- $this->note_private = $obj->note_private;
- $this->note_public = $obj->note_public;
- $this->paid = $obj->paid;
+ $this->id = $obj->rowid;
+ $this->ref = $obj->rowid;
+ $this->datestart = $this->db->jdate($obj->datestart);
+ $this->dateend = $this->db->jdate($obj->dateend);
+ $this->label = $obj->label;
+ $this->capital = $obj->capital;
+ $this->nbterm = $obj->nbterm;
+ $this->rate = $obj->rate;
+ $this->note_private = $obj->note_private;
+ $this->note_public = $obj->note_public;
+ $this->paid = $obj->paid;
+
+ $this->account_capital = $obj->accountancy_account_capital;
+ $this->account_insurance = $obj->accountancy_account_insurance;
+ $this->account_interest = $obj->accountancy_account_interest;
+
return 1;
}
diff --git a/htdocs/loan/index.php b/htdocs/loan/index.php
index 51f4e74e119..abf4e9470c1 100644
--- a/htdocs/loan/index.php
+++ b/htdocs/loan/index.php
@@ -2,7 +2,7 @@
/* Copyright (C) 2014 Alexandre Spangaro
* Copyright (C) 2015 Frederic France
* Copyright (C) 2015 Juanjo Menent
- * Copyright (C) 2016 Laurent Destailleur
+ * Copyright (C) 2016 Laurent Destailleur
*
* 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
@@ -104,6 +104,7 @@ if ($resql)
$var=true;
$param='';
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_ref) $param.="&search_ref=".$search_ref;
if ($search_label) $param.="&search_label=".$search_user;
diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php
index 969d5ecb436..155dacf460b 100644
--- a/htdocs/loan/note.php
+++ b/htdocs/loan/note.php
@@ -56,7 +56,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include,
$form = new Form($db);
-llxHeader('',$langs->trans("LoanArea"),'');
+llxHeader('',$langs->trans("Loan"),'');
if ($id > 0)
{
diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php
index 06061da5c22..e735480e414 100644
--- a/htdocs/loan/payment/payment.php
+++ b/htdocs/loan/payment/payment.php
@@ -1,5 +1,5 @@
+/* Copyright (C) 2014-2016 Alexandre Spangaro
* Copyright (C) 2015 Frederic France
*
* This program is free software; you can redistribute it and/or modify
@@ -138,7 +138,7 @@ if ($action == 'add_payment')
}
}
- $_GET["action"]='create';
+ $action = 'create';
}
@@ -152,12 +152,11 @@ $form=new Form($db);
// Form to create loan's payment
-if ($_GET["action"] == 'create')
+if ($action == 'create')
{
$total = $loan->capital;
print load_fiche_titre($langs->trans("DoPayment"));
- print " \n";
print '\n";
}
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 5a90bbf3650..982b109da99 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -131,7 +131,7 @@ class Product extends CommonObject
var $status_buy;
// Statut indique si le produit est un produit fini '1' ou une matiere premiere '0'
var $finished;
- // We must manage batch number, sell-by date and so on : '1':yes '0':no
+ // We must manage lot/batch number, sell-by date and so on : '1':yes '0':no
var $status_batch;
var $customcode; // Customs code
@@ -879,9 +879,10 @@ class Product extends CommonObject
* Delete a product from database (if not used)
*
* @param int $id Product id (usage of this is deprecated, delete should be called without parameters on a fetched object)
+ * @param int $notrigger Do not execute trigger
* @return int < 0 if KO, 0 = Not possible, > 0 if OK
*/
- function delete($id=0)
+ function delete($id=0, $notrigger=0)
{
// Deprecation warning
if ($id > 0) {
@@ -914,7 +915,7 @@ class Product extends CommonObject
{
$this->db->begin();
- if (! $error)
+ if (! $error && empty($notrigger))
{
// Call trigger
$result=$this->call_trigger('PRODUCT_DELETE',$user);
diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php
index 1e145390bac..15e44f8602d 100644
--- a/htdocs/product/composition/card.php
+++ b/htdocs/product/composition/card.php
@@ -283,7 +283,7 @@ if ($id > 0 || ! empty($ref))
else
{
print '';
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
print ' ';
}
print '';
@@ -454,7 +454,7 @@ if ($id > 0 || ! empty($ref))
if (! empty($conf->stock->enabled)) $colspan++;
print '';
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
print ' ';
}
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 0fdafd64ae5..c95156b4393 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -73,7 +73,8 @@ $pagenext = $page + 1;
if (! $sortfield) $sortfield="p.ref";
if (! $sortorder) $sortorder="ASC";
-$contextpage='productservicelist';
+// Initialize context for list
+$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'productservicelist';
if ($type === '1') { $contextpage='servicelist'; if ($search_type=='') $search_type='1'; }
if ($type === '0') { $contextpage='productlist'; if ($search_type=='') $search_type='0'; }
@@ -334,7 +335,8 @@ else
}
$param='';
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($search_categ > 0) $param.="&search_categ=".$search_categ;
if ($sref) $param="&sref=".$sref;
if ($search_ref_supplier) $param="&search_ref_supplier=".$search_ref_supplier;
diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php
index b9859f9ec9b..a19a39beb45 100644
--- a/htdocs/product/stock/class/mouvementstock.class.php
+++ b/htdocs/product/stock/class/mouvementstock.class.php
@@ -126,7 +126,6 @@ class MouvementStock extends CommonObject
return -2;
}
- // FIXME Code not complete to implement this
// Check table llx_product_lot from batchnumber for same product
// If found and eatby/sellby defined into table and provided and differs, return error
// If found and eatby/sellby defined into table and not provided, we take value from table
@@ -218,7 +217,7 @@ class MouvementStock extends CommonObject
$i++;
}
}
- else
+ else // If not found, we add record
{
$productlot = new Productlot($this->db);
$productlot->fk_product = $fk_product;
diff --git a/htdocs/product/stock/list.php b/htdocs/product/stock/list.php
index 58f95625d94..a1f19958cc9 100644
--- a/htdocs/product/stock/list.php
+++ b/htdocs/product/stock/list.php
@@ -108,7 +108,8 @@ if ($result)
llxHeader("",$langs->trans("ListOfWarehouses"),$help_url);
$param='';
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
print '';
print ' ';
diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php
index 0012db23d3d..8c5f55fb8af 100644
--- a/htdocs/product/stock/mouvement.php
+++ b/htdocs/product/stock/mouvement.php
@@ -66,7 +66,29 @@ if (! $sortorder) $sortorder="DESC";
$pdluoid=GETPOST('pdluoid','int');
-if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
+// Initialize context for list
+$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'movementlist';
+
+// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
+$hookmanager->initHooks(array($contextpage));
+$extrafields = new ExtraFields($db);
+
+// fetch optionals attributes and labels
+$extralabels = $extrafields->fetch_name_optionals_label('movement');
+$search_array_options=$extrafields->getOptionalsFromPost($extralabels,'','search_');
+
+
+
+/*
+ * Actions
+ */
+
+if ($cancel) $action=''; // Protection to avoid action for all cancel buttons
+
+include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
+
+// Do we click on purge search criteria ?
+if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
$year='';
$month='';
@@ -77,15 +99,9 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both
$search_user="";
$search_batch="";
$sall="";
+ $search_array_options=array();
}
-
-/*
- * Actions
- */
-
-if ($cancel) $action=''; // Protection to avoid action for all cancel buttons
-
// Correct stock
if ($action == "correct_stock")
{
@@ -344,10 +360,7 @@ $sql.= " WHERE m.fk_product = p.rowid";
$sql.= " AND m.fk_entrepot = e.rowid";
$sql.= " AND e.entity IN (".getEntity('stock', 1).")";
if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql.= " AND p.fk_product_type = 0";
-if ($id)
-{
- $sql.= " AND e.rowid ='".$id."'";
-}
+if ($id > 0) $sql.= " AND e.rowid ='".$id."'";
if ($month > 0)
{
if ($year > 0)
@@ -359,17 +372,14 @@ else if ($year > 0)
{
$sql.= " AND m.datem BETWEEN '".$db->idate(dol_get_first_day($year,1,false))."' AND '".$db->idate(dol_get_last_day($year,12,false))."'";
}
-if ($idproduct > 0)
-{
- $sql.= " AND p.rowid = '".$idproduct."'";
-}
-if (! empty($search_movement)) $sql.= " AND m.label LIKE '%".$db->escape($search_movement)."%'";
-if (! empty($search_inventorycode)) $sql.= " AND m.inventorycode LIKE '%".$db->escape($search_inventorycode)."%'";
-if (! empty($search_product_ref)) $sql.= " AND p.ref LIKE '%".$db->escape($search_product_ref)."%'";
-if (! empty($search_product)) $sql.= " AND p.label LIKE '%".$db->escape($search_product)."%'";
-if (! empty($search_warehouse)) $sql.= " AND e.rowid = '".$db->escape($search_warehouse)."'";
-if (! empty($search_user)) $sql.= " AND u.login LIKE '%".$db->escape($search_user)."%'";
-if (! empty($search_batch)) $sql.= " AND m.batch LIKE '%".$db->escape($search_batch)."%'";
+if ($idproduct > 0) $sql.= " AND p.rowid = '".$idproduct."'";
+if (! empty($search_movement)) $sql.= natural_search('m.label', $search_movement);
+if (! empty($search_inventorycode)) $sql.= natural_search('m.inventorycode', $search_inventorycode);
+if (! empty($search_product_ref)) $sql.= natural_search('p.ref', $search_product_ref);
+if (! empty($search_product)) $sql.= natural_search('p.label', $search_product);
+if ($search_warehouse > 0) $sql.= " AND e.rowid = '".$db->escape($search_warehouse)."'";
+if (! empty($search_user)) $sql.= natural_search('u.login', $search_user);
+if (! empty($search_batch)) $sql.= natural_search('m.batch', $search_batch);
$nbtotalofrecords = 0;
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
@@ -553,22 +563,40 @@ if ($resql)
$param='';
- if ($id > 0) $param.='&id='.$id;
- if ($search_movement) $param.='&search_movement='.urlencode($search_movement);
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if ($id > 0) $param.='&id='.$id;
+ if ($search_movement) $param.='&search_movement='.urlencode($search_movement);
if ($search_inventorycode) $param.='&search_inventorycode='.urlencode($search_inventorycode);
- if ($search_product_ref) $param.='&search_product_ref='.urlencode($search_product_ref);
- if ($search_product) $param.='&search_product='.urlencode($search_product);
- if ($search_warehouse) $param.='&search_warehouse='.urlencode($search_warehouse);
- if (!empty($sref)) $param.='&sref='.urlencode($sref); // FIXME $sref is not defined
- if (!empty($snom)) $param.='&snom='.urlencode($snom); // FIXME $snom is not defined
- if ($search_user) $param.='&search_user='.urlencode($search_user);
- if ($idproduct > 0) $param.='&idproduct='.$idproduct;
- if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords,'');
- else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords);
-
- print ' ';
+ if ($search_product_ref) $param.='&search_product_ref='.urlencode($search_product_ref);
+ if ($search_product) $param.='&search_product='.urlencode($search_product);
+ if ($search_warehouse > 0) $param.='&search_warehouse='.urlencode($search_warehouse);
+ if (!empty($sref)) $param.='&sref='.urlencode($sref); // FIXME $sref is not defined
+ if (!empty($snom)) $param.='&snom='.urlencode($snom); // FIXME $snom is not defined
+ if ($search_user) $param.='&search_user='.urlencode($search_user);
+ if ($idproduct > 0) $param.='&idproduct='.$idproduct;
+ // Add $param from extra fields
+ foreach ($search_array_options as $key => $val)
+ {
+ $crit=$val;
+ $tmpkey=preg_replace('/search_options_/','',$key);
+ if ($val != '') $param.='&search_options_'.$tmpkey.'='.urlencode($val);
+ }
+
+ print ' ';
+ if ($optioncss != '') print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
+ print ' ';
if ($id > 0) print ' ';
-
+
+ if ($id > 0) print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, '', 0, '', '', $limit);
+ else print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit);
+
print '';
print "";
//print_liste_field_titre($langs->trans("Id"),$_SERVER["PHP_SELF"], "m.rowid","",$param,"",$sortfield,$sortorder);
@@ -586,8 +614,9 @@ if ($resql)
print_liste_field_titre($langs->trans("Author"),$_SERVER["PHP_SELF"], "m.fk_user_author","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("InventoryCodeShort"),$_SERVER["PHP_SELF"], "m.inventorycode","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("LabelMovement"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
- print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"], "m.label","",$param,"",$sortfield,$sortorder);
- print_liste_field_titre($langs->trans("Units"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Source"),$_SERVER["PHP_SELF"], "","",$param,"",$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Qty"),$_SERVER["PHP_SELF"], "m.value","",$param,'align="right"',$sortfield,$sortorder);
+ print_liste_field_titre("");
print " \n";
// Lignes des champs de filtre
@@ -639,17 +668,21 @@ if ($resql)
print '';
print ' ';
print ' ';
-
+ // Qty
+ print '';
+ print ' ';
+ print ' ';
+ // Actions
print '';
- print ' ';
- print ' ';
+ $searchpitco=$form->showFilterAndCheckAddButtons(0);
+ print $searchpitco;
print ' ';
print "\n";
$arrayofuniqueproduct=array();
$var=True;
- while ($i < min($num,$conf->liste_limit))
+ while ($i < min($num,$limit))
{
$objp = $db->fetch_object($resql);
@@ -716,6 +749,9 @@ if ($resql)
print '';
if ($objp->value > 0) print '+';
print $objp->value.' ';
+
+ print ' ';
+
print "\n";
$i++;
}
diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php
index 56504432840..e49da226727 100644
--- a/htdocs/product/stock/product.php
+++ b/htdocs/product/stock/product.php
@@ -490,7 +490,8 @@ if ($id > 0 || $ref)
print '';
// Desired stock
- print ''.$form->editfieldkey("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer).' ';
+ print ' '.$form->editfieldkey($form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1),'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer);
+ print ' ';
print $form->editfieldval("DesiredStock",'desiredstock',$object->desiredstock,$object,$user->rights->produit->creer);
print ' ';
@@ -503,7 +504,7 @@ if ($id > 0 || $ref)
$text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)?$langs->trans("ReStockOnValidateOrder").' ':'');
$text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)?$langs->trans("ReStockOnDispatchOrder").' ':'');
print '';
- print $form->textwithtooltip($langs->trans("PhysicalStock"), $text_stock_options, 2, 1, img_picto('', 'info'), '', 2);
+ print $form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1);
print ' ';
print ''.$object->stock_reel;
if ($object->seuil_stock_alerte != '' && ($object->stock_reel < $object->seuil_stock_alerte)) print ' '.img_warning($langs->trans("StockLowerThanLimit"));
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index a8fd68f6a34..65bd340fa85 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -305,16 +305,14 @@ if ($resql)
$num = $db->num_rows($resql);
$params='';
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
-
-if ($search_entity != '') $params.= '&search_entity='.urlencode($search_entity);
-if ($search_fk_product != '') $params.= '&search_fk_product='.urlencode($search_fk_product);
-if ($search_batch != '') $params.= '&search_batch='.urlencode($search_batch);
-if ($search_fk_user_creat != '') $params.= '&search_fk_user_creat='.urlencode($search_fk_user_creat);
-if ($search_fk_user_modif != '') $params.= '&search_fk_user_modif='.urlencode($search_fk_user_modif);
-if ($search_import_key != '') $params.= '&search_import_key='.urlencode($search_import_key);
-
-
+ if ($search_entity != '') $params.= '&search_entity='.urlencode($search_entity);
+ if ($search_fk_product != '') $params.= '&search_fk_product='.urlencode($search_fk_product);
+ if ($search_batch != '') $params.= '&search_batch='.urlencode($search_batch);
+ if ($search_fk_user_creat != '') $params.= '&search_fk_user_creat='.urlencode($search_fk_user_creat);
+ if ($search_fk_user_modif != '') $params.= '&search_fk_user_modif='.urlencode($search_fk_user_modif);
+ if ($search_import_key != '') $params.= '&search_import_key='.urlencode($search_import_key);
if ($optioncss != '') $param.='&optioncss='.$optioncss;
// Add $param from extra fields
foreach ($search_array_options as $key => $val)
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 1de8027dd0e..43b738021ee 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -1627,8 +1627,8 @@ class Project extends CommonObject
$response = new WorkboardResponse();
$response->warning_delay = $conf->projet->warning_delay/60/60/24;
$response->label = $langs->trans("OpenedProjects");
- if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/index.php?search_status=1&mainmenu=project';
- else $response->url = DOL_URL_ROOT.'/projet/index.php?mode=mine&search_status=1&mainmenu=project';
+ if ($user->rights->projet->all->lire) $response->url = DOL_URL_ROOT.'/projet/list.php?search_status=1&mainmenu=project';
+ else $response->url = DOL_URL_ROOT.'/projet/list.php?mode=mine&search_status=1&mainmenu=project';
$response->img = img_object($langs->trans("Projects"),"project");
// This assignment in condition is not a bug. It allows walking the results.
@@ -1719,9 +1719,8 @@ class Project extends CommonObject
{
global $conf;
- if (! ($this->statut == 1)) {
- return false;
- }
+ if (! ($this->statut == 1)) return false;
+ if (! $this->datee) return false;
$now = dol_now();
diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php
index 6859474a987..ce2ff974013 100644
--- a/htdocs/projet/list.php
+++ b/htdocs/projet/list.php
@@ -90,8 +90,8 @@ $year = GETPOST('year','int');
if ($search_status == '') $search_status=-1; // -1 or 1
-// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
-$contextpage='projectlist';
+// Initialize context for list
+$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'projectlist';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array($contextpage));
@@ -308,7 +308,8 @@ if ($resql)
$num = $db->num_rows($resql);
$param='';
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sday) $param.='&sday='.$day;
if ($smonth) $param.='&smonth='.$smonth;
if ($syear) $param.='&syear=' .$syear;
@@ -346,7 +347,8 @@ if ($resql)
print ' ';
print ' ';
print ' ';
-
+ print ' ';
+
print_barre_liste($text, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, "", $num, $nbtotalofrecords, 'title_project', 0, '', '', $limit);
// Show description of content
@@ -425,7 +427,7 @@ if ($resql)
print $hookmanager->resPrint;
if (! empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'],$_SERVER["PHP_SELF"],"p.datec","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
if (! empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'],$_SERVER["PHP_SELF"],"p.tms","",$param,'align="center" class="nowrap"',$sortfield,$sortorder);
- if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'],$_SERVER["PHP_SELF"],"p.fk_statut","",$param,'align="center"',$sortfield,$sortorder);
+ if (! empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'],$_SERVER["PHP_SELF"],"p.fk_statut","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"],"",'','','align="right"',$sortfield,$sortorder,'maxwidthsearch ');
print " \n";
@@ -558,6 +560,9 @@ if ($resql)
$projectstatic->user_author_id = $obj->fk_user_creat;
$projectstatic->public = $obj->public;
$projectstatic->ref = $obj->ref;
+ $projectstatic->datee = $obj->date_end;
+ $projectstatic->statut = $obj->fk_statut;
+ $projectstatic->opp_status = $obj->fk_opp_status;
$userAccess = $projectstatic->restrictedProjectArea($user); // why this ?
if ($userAccess >= 0)
@@ -570,6 +575,7 @@ if ($resql)
{
print '';
print $projectstatic->getNomUrl(1);
+ if ($projectstatic->hasDelay()) print img_warning($langs->trans('Late'));
print ' ';
}
// Title
diff --git a/htdocs/projet/tasks/list.php b/htdocs/projet/tasks/list.php
index 8ec4eeffedb..e5c807371c2 100644
--- a/htdocs/projet/tasks/list.php
+++ b/htdocs/projet/tasks/list.php
@@ -1,6 +1,6 @@
- * Copyright (C) 2006-2015 Laurent Destailleur
+ * Copyright (C) 2006-2016 Laurent Destailleur
* Copyright (C) 2006-2010 Regis Houssin
*
* This program is free software; you can redistribute it and/or modify
@@ -58,8 +58,8 @@ $day = GETPOST('day','int');
$month = GETPOST('month','int');
$year = GETPOST('year','int');
-// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
-$contextpage='tasklist';
+// Initialize context for list
+$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'tasklist';
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
$hookmanager->initHooks(array($contextpage));
@@ -213,7 +213,7 @@ else dol_print_error($db);
if (count($listoftaskcontacttype) == 0) $listoftaskcontacttype[0]='0'; // To avoid sql syntax error if not found
$distinct='DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once.
-$sql = "SELECT ".$distinct." p.rowid as projectid, p.ref as projectref, p.title as projecttitle, p.fk_statut as projectstatus, p.fk_opp_status, p.public, p.fk_user_creat as projectusercreate";
+$sql = "SELECT ".$distinct." p.rowid as projectid, p.ref as projectref, p.title as projecttitle, p.fk_statut as projectstatus, p.datee as projectdatee, p.fk_opp_status, p.public, p.fk_user_creat as projectusercreate";
$sql.= ", s.nom as name, s.rowid as socid";
$sql.= ", t.datec as date_creation, t.dateo as date_start, t.datee as date_end, t.tms as date_update";
$sql.= ", t.rowid as id, t.ref, t.label, t.planned_workload, t.duration_effective, t.progress, t.fk_statut";
@@ -314,6 +314,7 @@ if ($resql)
$num = $db->num_rows($resql);
$param='';
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sday) $param.='&sday='.$day;
if ($smonth) $param.='&smonth='.$smonth;
@@ -550,12 +551,14 @@ if ($resql)
$projectstatic->title = $obj->projecttitle;
$projectstatic->public = $obj->public;
$projectstatic->statut = $obj->projectstatus;
+ $projectstatic->datee = $obj->projectdatee;
$taskstatic->id = $obj->id;
$taskstatic->ref = $obj->ref;
$taskstatic->label = $obj->label;
$taskstatic->fk_statut = $obj->fk_statut;
$taskstatic->progress = $obj->progress;
+ $taskstatic->datee = $obj->date_end;
$userAccess = $projectstatic->restrictedProjectArea($user); // why this ?
if ($userAccess >= 0)
@@ -568,6 +571,7 @@ if ($resql)
{
print '';
print $projectstatic->getNomUrl(1, 'task');
+ if ($projectstatic->hasDelay()) print img_warning("Late");
print ' ';
}
// Title
@@ -605,6 +609,7 @@ if ($resql)
{
print '';
print $taskstatic->getNomUrl(1,'withproject');
+ if ($taskstatic->hasDelay()) print img_warning("Late");
print ' ';
}
// Label
diff --git a/htdocs/public/test/test_arrays.php b/htdocs/public/test/test_arrays.php
index 44911b8fa9b..28ff4bdb743 100644
--- a/htdocs/public/test/test_arrays.php
+++ b/htdocs/public/test/test_arrays.php
@@ -30,7 +30,7 @@ if (empty($usedolheader))
Test page
-
+
@@ -40,6 +40,7 @@ if (empty($usedolheader))
+
@@ -87,8 +88,9 @@ This page is a sample of page using tables. It is designed to make test with
- tablednd
- Example 0a : Table with div+div+div containg a select that should be overflowed and truncated => Use this to align text or form
+
+ Example 0a : Table with div+div+div containg a select that should be overflowed and truncated => Use this to align text or form
@@ -127,12 +129,31 @@ This page is a sample of page using tables. It is designed to make test with
-
+
Example 1 : Standard table/thead/tbody/tr/th-td (no class pair/impair on td) => Use this if you need the drag and drop for lines or for long result tables
+
+
+
+
-" id="tablelines3">
+
+" id="tablelines3">
+
trans('title1'),0,$_SERVER["PHP_SELF"],'aaa','','','align="left"',$sortfield,$sortorder); ?>
trans('title2'),0,$_SERVER["PHP_SELF"],'bbb','','','align="right"',$sortfield,$sortorder); ?>
trans('title3'),0,$_SERVER["PHP_SELF"],'ccc','','','align="center"',$sortfield,$sortorder); ?>
+
+
getNomUrl(1); ?> b1 c1
-a2 b2 c2
+a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 a2 b2 c2
a3 b3 c3
+
+
+
@@ -323,7 +351,7 @@ $('xxxth').replaceWith(
line2
dfsdf
- xxx
+ xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx xxx
line3
diff --git a/htdocs/resource/card.php b/htdocs/resource/card.php
index 163eeab13ce..95f5cf0574b 100644
--- a/htdocs/resource/card.php
+++ b/htdocs/resource/card.php
@@ -168,22 +168,22 @@ if ( $object->fetch($id) > 0 )
print ' ';
print ' ';
- dol_fiche_head($head, 'resource', $langs->trans("ResourceSingular"),0,'resource@resource');
+ dol_fiche_head($head, 'resource', $langs->trans("ResourceSingular"),0,'resource');
print '';
// Ref
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ''.$langs->trans("ResourceFormLabel_ref").' ';
print ' ';
// Type
- print ''.$langs->trans("ResourceType").' ';
+ print ''.$langs->trans("ResourceType").' ';
print '';
$ret = $formresource->select_types_resource($object->fk_code_type_resource,'fk_code_type_resource','',2);
print ' ';
// Description
- print ''.$langs->trans("Description").' ';
+ print ''.$langs->trans("Description").' ';
print '';
print ''.($_POST['description'] ? GETPOST('description','alpha') : $object->description).' ';
print ' ';
@@ -201,7 +201,7 @@ if ( $object->fetch($id) > 0 )
}
else
{
- dol_fiche_head($head, 'resource', $langs->trans("ResourceSingular"),0,'resource@resource');
+ dol_fiche_head($head, 'resource', $langs->trans("ResourceSingular"),0,'resource');
// Confirm deleting resource line
if ($action == 'delete')
@@ -215,7 +215,7 @@ if ( $object->fetch($id) > 0 )
*/
print '';
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ' '.$langs->trans("ResourceFormLabel_ref").' ';
$linkback = $objet->ref.' '.$langs->trans("BackToList").' ';
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
print ' ';
diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php
index 87794b92392..4f08e6f4209 100644
--- a/htdocs/resource/class/dolresource.class.php
+++ b/htdocs/resource/class/dolresource.class.php
@@ -875,7 +875,7 @@ class Dolresource extends CommonObject
if ($option == '')
{
$link = '';
- $picto='resource@resource';
+ $picto='resource';
$label=$langs->trans("ShowResource").': '.$this->ref;
}
diff --git a/htdocs/resource/class/html.formresource.class.php b/htdocs/resource/class/html.formresource.class.php
index 891ed33d1e5..b094aacd1ea 100644
--- a/htdocs/resource/class/html.formresource.class.php
+++ b/htdocs/resource/class/html.formresource.class.php
@@ -17,11 +17,12 @@
*/
/**
- * \file place/class/html.formresource.class.php
+ * \file resource/class/html.formresource.class.php
* \ingroup core
* \brief Class file to manage forms into resource module
*/
require_once(DOL_DOCUMENT_ROOT ."/core/class/html.form.class.php");
+require_once(DOL_DOCUMENT_ROOT ."/resource/class/dolresource.class.php");
/**
@@ -56,7 +57,7 @@ class FormResource
/**
* Output html form to select a resource
*
- * @param string $selected Preselected type
+ * @param int $selected Preselected resource id
* @param string $htmlname Name of field in form
* @param string $filter Optionnal filters criteras (example: 's.rowid <> x')
* @param int $showempty Add an empty field
diff --git a/htdocs/resource/contact.php b/htdocs/resource/contact.php
index d635ee2e1e6..97dbb0de1be 100644
--- a/htdocs/resource/contact.php
+++ b/htdocs/resource/contact.php
@@ -119,7 +119,7 @@ if ($id > 0 || ! empty($ref))
$head = resource_prepare_head($object);
- dol_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), 0, 'resource@resource');
+ dol_fiche_head($head, 'contact', $langs->trans("ResourceSingular"), 0, 'resource');
/*
@@ -127,7 +127,7 @@ if ($id > 0 || ! empty($ref))
*/
print ' ';
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ' '.$langs->trans("ResourceFormLabel_ref").' ';
$linkback = $objet->ref.' '.$langs->trans("BackToList").' ';
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
print ' ';
diff --git a/htdocs/resource/document.php b/htdocs/resource/document.php
index a21bc88c319..099fb4f7d2b 100644
--- a/htdocs/resource/document.php
+++ b/htdocs/resource/document.php
@@ -104,7 +104,7 @@ if ($object->id)
print '';
- print ''.$langs->trans("ResourceFormLabel_ref").' ';
+ print ' '.$langs->trans("ResourceFormLabel_ref").' ';
$linkback = $objet->ref.' '.$langs->trans("BackToList").' ';
print $form->showrefnav($object, 'id', $linkback,1,"rowid");
print ' ';
diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php
index 59a95f6f57a..7cb5b74fac3 100644
--- a/htdocs/resource/element_resource.php
+++ b/htdocs/resource/element_resource.php
@@ -168,7 +168,7 @@ if($ret == -1) {
dol_print_error($db,$object->error);
exit;
}
-if(!$ret) {
+if (!$ret) {
print ''.$langs->trans('NoResourceInDatabase').'
';
}
else
@@ -304,6 +304,7 @@ else
//print load_fiche_titre($langs->trans('ResourcesLinkedToElement'),'','');
+ // Show list of resource links
foreach ($object->available_resources as $modresources => $resources)
{
diff --git a/htdocs/resource/img/index.html b/htdocs/resource/img/index.html
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/htdocs/resource/img/object_resource.png b/htdocs/resource/img/object_resource.png
deleted file mode 100644
index 55f2e1bf937..00000000000
Binary files a/htdocs/resource/img/object_resource.png and /dev/null differ
diff --git a/htdocs/resource/img/resource.png b/htdocs/resource/img/resource.png
deleted file mode 100644
index 7d5bbfa5a3d..00000000000
Binary files a/htdocs/resource/img/resource.png and /dev/null differ
diff --git a/htdocs/resource/list.php b/htdocs/resource/list.php
index b33bbec259e..777bcb374d6 100644
--- a/htdocs/resource/list.php
+++ b/htdocs/resource/list.php
@@ -106,10 +106,9 @@ else
print ''."\n";
print '';
- print_liste_field_titre($langs->trans('Id'),$_SERVER['PHP_SELF'],'t.rowid','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'t.ref','',$param,'',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('ResourceType'),$_SERVER['PHP_SELF'],'ty.code','',$param,'',$sortfield,$sortorder);
- print_liste_field_titre($langs->trans('Action'),"","","","",'width="60" align="center"',"","");
+ print_liste_field_titre('',"","","","",'width="60" align="center"',"","");
print " \n";
foreach ($object->lines as $resource)
@@ -117,15 +116,12 @@ else
$var=!$var;
$style='';
- if($resource->id == GETPOST('lineid'))
- $style='style="background: orange;"';
+ if ($resource->id == GETPOST('lineid')) $style='style="background: orange;"';
- print '';
- print ''.$resource->id.' ';
- print ' ';
+ print '';
print '';
- print $resource->ref;
+ print $resource->getNomUrl(5);
print ' ';
print '';
diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php
index e404a3bdef8..30e37eba77f 100644
--- a/htdocs/resource/note.php
+++ b/htdocs/resource/note.php
@@ -1,8 +1,9 @@
* Copyright (C) 2011-2012 Juanjo Menent
+ * Copyright (C) 2016 Laurent Destailleur
* Copyright (C) 2013 Florian Henry
- * Copyright (C) 2016 Gilles Poirier
+ * Copyright (C) 2016 Gilles Poirier
*
* 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
@@ -44,6 +45,7 @@ $object->fetch($id,$ref);
$permissionnote=$user->rights->resource->write; // Used by the include of actions_setnotes.inc.php
+
/*
* Actions
*/
@@ -62,7 +64,7 @@ $form = new Form($db);
if ($id > 0 || ! empty($ref))
{
$head = resource_prepare_head($object);
- dol_fiche_head($head, 'note', $langs->trans('ResourceSingular'), 0, 'resource@resource');
+ dol_fiche_head($head, 'note', $langs->trans('ResourceSingular'), 0, 'resource');
print '';
print ''.$langs->trans("ResourceFormLabel_ref").' ';
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index cb1d783497c..c7f92b2ca1b 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -1347,7 +1347,7 @@ class Societe extends CommonObject
$this->db->begin();
// User is mandatory for trigger call
- if ($call_trigger)
+ if (! $error && $call_trigger)
{
// Call trigger
$result=$this->call_trigger('COMPANY_DELETE',$fuser);
diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php
index b7ea7a93041..70dee1ab8eb 100644
--- a/htdocs/societe/consumption.php
+++ b/htdocs/societe/consumption.php
@@ -333,7 +333,8 @@ if ($sql_select)
$num = $db->num_rows($resql);
$param="&socid=".$socid."&type_element=".$type_element;
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sprod_fulldescr) $param.= "&sprod_fulldescr=".urlencode($sprod_fulldescr);
if ($sref) $param.= "&sref=".urlencode($sref);
if ($month) $param.= "&month=".$month;
diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php
index 7ad8ac8362d..019542810e8 100644
--- a/htdocs/societe/list.php
+++ b/htdocs/societe/list.php
@@ -438,7 +438,8 @@ if ($resql)
$i = 0;
$param='';
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($sall != '') $param .= "&sall=".urlencode($sall);
if ($search_categ > 0) $param.='&search_categ='.urlencode($search_categ);
if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale);
diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php
index ea9b68d30be..967a510d714 100644
--- a/htdocs/supplier_proposal/list.php
+++ b/htdocs/supplier_proposal/list.php
@@ -277,7 +277,8 @@ if ($result)
}
$param='&socid='.$socid.'&viewstatut='.$viewstatut;
- if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage;
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
if ($month) $param.='&month='.$month;
if ($year) $param.='&year='.$year;
if ($search_ref) $param.='&search_ref=' .$search_ref;
diff --git a/htdocs/theme/eldy/img/object_calendargantt.png b/htdocs/theme/eldy/img/object_calendargantt.png
new file mode 100644
index 00000000000..4d727dd6f24
Binary files /dev/null and b/htdocs/theme/eldy/img/object_calendargantt.png differ
diff --git a/htdocs/theme/eldy/img/object_calendarpertype.png b/htdocs/theme/eldy/img/object_calendarpertype.png
new file mode 100644
index 00000000000..ba16a4ab6c0
Binary files /dev/null and b/htdocs/theme/eldy/img/object_calendarpertype.png differ
diff --git a/htdocs/theme/eldy/img/object_resource.png b/htdocs/theme/eldy/img/object_resource.png
index 8cda1f3f220..2d93019b62f 100644
Binary files a/htdocs/theme/eldy/img/object_resource.png and b/htdocs/theme/eldy/img/object_resource.png differ
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index a75c808b69d..383fc2f9abe 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -100,6 +100,7 @@ $fontsizesmaller='11';
$usegradienttop=(isset($conf->global->THEME_ELDY_TOPMENU_BACK1)?0:1);
$usegradienttitle=(isset($conf->global->THEME_ELDY_BACKTITLE1)?0:1);
$useboldtitle=(isset($conf->global->THEME_ELDY_USEBOLDTITLE)?$conf->global->THEME_ELDY_USEBOLDTITLE:1);
+$borderwith=2;
// Case of option always editable
if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody;
@@ -564,6 +565,18 @@ div.myavailability {
max-width: 0;
overflow: auto;
}
+.tablelistofcalendars {
+ margin-top: 25px !important;
+}
+
+/* DOL_XXX for future usage (when left menu has been removed). If we do not use datatable */
+.table-responsive {
+ width: calc(100% - 330px);
+ margin-bottom: 15px;
+ overflow-y: hidden;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+}
+
/* ============================================================================== */
@@ -634,16 +647,14 @@ td.showDragHandle {
/* ============================================================================== */
#id-container {
- /* margin-top: 12px;
- margin-bottom: 8px; */
- display: table;
+ display: table; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */
table-layout: fixed;
}
#id-right, #id-left {
padding-top: 12px;
padding-bottom: 8px;
- display: table-cell;
+ display: table-cell; /* DOL_XXX Empeche fonctionnement correct du scroll horizontal sur tableau, avec datatable ou CSS */
float: none;
vertical-align: top;
}
@@ -656,6 +667,44 @@ td.showDragHandle {
height: calc(100% - 50px);*/
}
+/* For desktop */
+global->MAIN_OPTIMIZEFORTEXTBROWSER)) { ?>
+#id-container {
+ width: 100%;
+}
+.side-nav {
+ border-right: 1px solid #BBB;
+ border-bottom: 1px solid #BBB;
+ background: #FFF;
+}
+.side-nav {
+ position: absolute;
+ z-index: 200;
+}
+div.blockvmenulogo
+{
+ border-bottom: 0 !important;
+}
+div.blockvmenusearch {
+ border-bottom: 1px solid #e0e0e0;
+ padding-bottom: 10px !important;
+}
+div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks, div.blockvmenuend {
+ border-top: none !important;
+ border-left: none !important;
+ border-right: none !important;
+ border-bottom: 1px solid #e0e0e0;
+ padding-left: 0 !important;
+}
+div.vmenu, td.vmenu {
+ padding-right: 6px !important;
+}
+div.blockvmenulast {
+ border-bottom: 0;
+}
+
+
+
div.fiche {
margin-: px;
@@ -730,6 +779,11 @@ div.ficheaddleft {
}
}
+/* For table into table into card */
+div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td {
+ padding: 0 0 0 0;
+}
+
.containercenter {
display : table;
margin : 0px auto;
@@ -792,7 +846,7 @@ img.photoref {
.underrefbanner {
}
.underbanner {
- border-bottom: 2px solid rgb();
+ border-bottom: px solid rgb();
}
@@ -822,11 +876,11 @@ div#id-top {
background-image: -ms-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.1)), color-stop(1, rgba(0,0,0,.4)) );
-
+ /*
height: 34px;
height: px;
-
+ */
}
@@ -896,9 +950,10 @@ ul.tmenu { /* t r b l */
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
list-style: none;
+ display: table;
}
ul.tmenu li { /* We need this to have background color when menu entry wraps on new lines */
- background: rgb();
+/* background: rgb();
background-image: linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -o-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
@@ -906,7 +961,7 @@ ul.tmenu li { /* We need this to have background color when menu entry wraps on
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -ms-linear-gradient(top, rgba(255,255,255,.1) 0%, rgba(0,0,0,.4) 100%);
background-image: -webkit-gradient( linear, left top, left bottom, color-stop(0, rgba(255,255,255,.1)), color-stop(1, rgba(0,0,0,.4)) );
-
+ */
}
li.tmenu, li.tmenusel {
@@ -914,7 +969,6 @@ li.tmenu, li.tmenusel {
vertical-align: bottom;
global->MAIN_MENU_INVERT)) { ?>
float: ;
- /* height: px; */
position:relative;
display: block;
@@ -2191,7 +2245,7 @@ table.liste, table.noborder, table.formdoc, div.noborder {
border-collapse: separate !important;
border-spacing: 0px;
- border-top-width: 2px;
+ border-top-width: px;
border-top-color: rgb();
border-top-style: solid;
@@ -2217,13 +2271,6 @@ table.liste, table.noborder, table.formdoc, div.noborder {
-webkit-border-radius: 0.2em;
border-radius: 0.2em;*/
}
-/*
-#tablelines tr.liste_titre:first-child td, form.formnoborder div, tr.liste_titre.trnoborder td {
- border-top-width: 1px;
- border-top-color: rgb();
- border-top-style: solid;
-}
-*/
.liste_titre_add td, .liste_titre_add .tagtd
{
border-top-width: 1px;
@@ -2235,7 +2282,7 @@ table.liste tr, table.noborder tr, div.noborder form {
min-height: 20px;
}
table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td {
- padding: 10px 2px 10px 3px; /* t r b l */
+ padding: 8px 2px 8px 3px; /* t r b l */
}
tr.box_titre .nobordernopadding td { padding: 0px ! important; }
table.liste td, table.noborder td, div.noborder form, div.noborder form div {
@@ -2558,7 +2605,7 @@ div.liste_titre {
border-top-style: solid;
}
div.liste_titre_bydiv {
- border-top-width: 2px;
+ border-top-width: px;
border-top-color: rgb();
border-top-style: solid;
@@ -2608,6 +2655,11 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
text-shadow: none !important;
}
+tr.liste_titre_topborder td {
+ border-top-width: px;
+ border-top-color: rgb();
+ border-top-style: solid;
+}
.liste_titre td a {
text-shadow: none !important;
color: rgb();
@@ -2646,6 +2698,12 @@ form.liste_total div {
border-bottom: none;
}
+.paymenttable, .margintable {
+ border-top-width: px !important;
+ border-top-color: rgb() !important;
+ border-top-style: solid !important;
+}
+
.margintable td {
border: 0px !important;
}
diff --git a/htdocs/theme/md/img/object_calendargantt.png b/htdocs/theme/md/img/object_calendargantt.png
new file mode 100644
index 00000000000..b49fe7b2bfb
Binary files /dev/null and b/htdocs/theme/md/img/object_calendargantt.png differ
diff --git a/htdocs/theme/md/img/object_calendarpertype.png b/htdocs/theme/md/img/object_calendarpertype.png
new file mode 100644
index 00000000000..244da5bedd0
Binary files /dev/null and b/htdocs/theme/md/img/object_calendarpertype.png differ
diff --git a/htdocs/theme/md/img/object_calendarperuser.png b/htdocs/theme/md/img/object_calendarperuser.png
index 98a013a4014..244da5bedd0 100644
Binary files a/htdocs/theme/md/img/object_calendarperuser.png and b/htdocs/theme/md/img/object_calendarperuser.png differ
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 68fd5d25e5f..7f3e5d5040f 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -100,6 +100,7 @@ $fontsize='13';
$fontsizesmaller='11';
$usegradient=0;
$useboldtitle=(isset($conf->global->THEME_ELDY_USEBOLDTITLE)?$conf->global->THEME_ELDY_USEBOLDTITLE:1);
+$borderwith=2;
// Case of option always editable
if (! isset($conf->global->THEME_ELDY_BACKBODY)) $conf->global->THEME_ELDY_BACKBODY=$colorbackbody;
@@ -169,7 +170,7 @@ else { $colortextbackvmenu='000000'; }
$tmppart=explode(',',$colorbacktitle1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
if ($tmpval <= 260) { $colortexttitle='FFFFFF'; $colorshadowtitle='888888'; }
-else { $colortexttitle='404040'; $colorshadowtitle='FFFFFF'; }
+else { $colortexttitle='101010'; $colorshadowtitle='FFFFFF'; }
$tmppart=explode(',',$colorbacktabcard1);
$tmpval=(! empty($tmppart[1]) ? $tmppart[1] : '')+(! empty($tmppart[2]) ? $tmppart[2] : '')+(! empty($tmppart[3]) ? $tmppart[3] : '');
if ($tmpval <= 340) { $colortextbacktab='FFFFFF'; }
@@ -563,6 +564,17 @@ div.myavailability {
max-width: 0;
overflow: auto;
}
+.tablelistofcalendars {
+ margin-top: 25px !important;
+}
+
+/* for future usage (when left menu has been removed) */
+.table-responsive {
+ width: calc(100% - 330px);
+ margin-bottom: 15px;
+ overflow-y: hidden;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+}
/* ============================================================================== */
@@ -645,10 +657,6 @@ td.showDragHandle {
vertical-align: top;
}
#id-top {
-/* min-width: 100%;
- position: relative;
- heigth: 52px;
- background: #f00;*/
}
#id-left {
min-height: 100%;
@@ -785,6 +793,15 @@ div.ficheaddleft {
}
}
+/* For table into table into card */
+div.ficheaddleft tr.liste_titre:first-child td table.nobordernopadding td {
+ padding: 0 0 0 0;
+}
+
+table.noborder tr.liste_titre td {
+ padding: 3px !important;
+}
+
.containercenter {
display : table;
margin : 0px auto;
@@ -844,7 +861,7 @@ img.photoref {
.underrefbanner {
}
.underbanner {
- border-bottom: 2px solid rgb();;
+ border-bottom: px solid rgb();
}
@@ -943,7 +960,7 @@ ul.tmenu { /* t r b l */
padding: 0px 0px 0px 0px;
margin: 0px 0px 0px 0px;
list-style: none;
- /* box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important; */
+ display: table;
}
ul.tmenu li {
background: rgb();
@@ -988,10 +1005,8 @@ li.tmenusel, li.tmenu:hover {
opacity: .50; /* show only a slight shadow */
}
.tmenuend .tmenuleft { width: 0px; }
-/* .tmenuend { display: none; } We keep tmenuend it to show background for rest of line */
-.tmenuend .tmenucenter {
- width: 1px;
-}
+.tmenuend { display: none; }
+
div.tmenuleft
{
float: ;
@@ -1429,6 +1444,11 @@ div.blockvmenusearch
padding-bottom: 10px;
border-bottom: 1px solid #f4f4f4;
}
+div.blockvmenusearchphone
+{
+ border-bottom: none;
+ margin-bottom: 0px;
+}
div.blockvmenuhelp
{
@@ -1874,7 +1894,10 @@ span.tabspan {
/* Boutons actions */
/* ============================================================================== */
-div.divButAction { margin-bottom: 1.4em; }
+div.divButAction {
+ margin-bottom: 1.4em;
+ vertical-align: top;
+}
span.butAction, span.butActionDelete {
cursor: pointer;
@@ -2082,7 +2105,7 @@ table.liste, table.noborder, table.formdoc, div.noborder {
border-collapse: separate !important;
border-spacing: 0px;
- border-top-width: 1px;
+ border-top-width: px;
border-top-color: rgb();
border-top-style: solid;
@@ -2129,7 +2152,7 @@ table.noborder tr, div.noborder form {
}
table.liste th, table.noborder th, table.noborder tr.liste_titre td {
- padding: 12px 2px 12px 3px; /* t r b l */
+ padding: 8px 2px 8px 3px; /* t r b l */
}
table.noborder td, div.noborder form, div.noborder form div {
padding: 4px 2px 4px 3px; /* t r b l */
@@ -2418,7 +2441,7 @@ div.liste_titre {
border-top-style: solid;
}
div.liste_titre_bydiv {
- border-top-width: 1px;
+ border-top-width: px;
border-top-color: rgb();
border-top-style: solid;
@@ -2467,6 +2490,11 @@ tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste
tr.liste_titre th a, th.liste_titre a, tr.liste_titre td a, td.liste_titre a, form.liste_titre div a, div.liste_titre a {
text-shadow: none !important;
}
+tr.liste_titre_topborder td {
+ border-top-width: px;
+ border-top-color: rgb();
+ border-top-style: solid;
+}
.liste_titre td a {
text-shadow: none !important;
color: rgb();
@@ -2506,6 +2534,12 @@ input.liste_titre {
border-bottom: none;
}
+.paymenttable, .margintable {
+ border-top-width: px !important;
+ border-top-color: rgb() !important;
+ border-top-style: solid !important;
+}
+
.margintable td {
border: 0px !important;
}
diff --git a/htdocs/user/card.php b/htdocs/user/card.php
index dc10819ba84..c0ac112d51f 100644
--- a/htdocs/user/card.php
+++ b/htdocs/user/card.php
@@ -1738,7 +1738,7 @@ else
}
else
{
- print ' '.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
}
print "
";
diff --git a/htdocs/user/group/card.php b/htdocs/user/group/card.php
index 716db97b911..1da40878a62 100644
--- a/htdocs/user/group/card.php
+++ b/htdocs/user/group/card.php
@@ -491,7 +491,7 @@ else
}
else
{
- print ''.$langs->trans("None").' ';
+ print ''.$langs->trans("None").' ';
}
print "
";
print " ";