diff --git a/ChangeLog b/ChangeLog
index 19859731a6c..797dbaec627 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,14 +19,15 @@ For users:
- New: Add object_hour as substitution tag for opendocument generation.
- New: Add option MEMBER_PAYONLINE_SENDEMAIL to send email when paypal or paybox payment is done.
- New: Implement same rule for return value of all command line scripts (0 when success, <>0 if error).
-- New: Clone product/service composition
-- New: [ task #926 ] Add extrafield feature on order lines
-- New: [ task #927 ] Add extrafield feature on Proposal lines
-- New: [ task #928 ] Add extrafield feature on invoice lines
-- New: Add option ADHERENT_LOGIN_NOT_REQUIRED
+- New: Clone product/service composition.
+- New: [ task #926 ] Add extrafield feature on order lines.
+- New: [ task #927 ] Add extrafield feature on Proposal lines.
+- New: [ task #928 ] Add extrafield feature on invoice lines.
+- New: Add option ADHERENT_LOGIN_NOT_REQUIRED.
+- New: Add a cron module.
For translators:
-- Normalized sort order of all languages files with english ref file.
+- Normalized sort order of all languages files with english reference files.
For developers:
- New: DolGraph can build graph with three lines.
diff --git a/dev/findutf8bomincludes.sh b/dev/findutf8bomincludes.sh
deleted file mode 100755
index 4a9458654d2..00000000000
--- a/dev/findutf8bomincludes.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# Checks if files contains UTF-8 BOM
-# in dolibarr includes tree excluding
-# git repository
-#
-# Raphaël Doursenaud - rdoursenaud@gpcsolutions.fr
-grep -rlI \
---exclude-dir='.git' \
-$'\xEF\xBB\xBF' htdocs/includes
diff --git a/dev/fixutf8bomfiles.sh b/dev/fixutf8bomfiles.sh
index ea20f9957a2..db34cdcdc1d 100755
--- a/dev/fixutf8bomfiles.sh
+++ b/dev/fixutf8bomfiles.sh
@@ -12,20 +12,26 @@
# Syntax
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
then
- echo "Usage: fixutf8bomfiles.sh [list|fix]"
+ echo "Usage: fixutf8bomfiles.sh (list|fix) [addincludes]"
+fi
+
+if [ "x$2" != "xaddincludes" ]
+then
+ export moreoptions="--exclude-dir='includes'"
fi
# To detec
if [ "x$1" = "xlist" ]
then
#find . \( -iname '*.php' -print0 -o -iname '*.sh' -print0 -o -iname '*.pl' -print0 -o -iname '*.lang' -print0 -o -iname '*.txt' \) -print0 | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'
- grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='includes' --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'
+ echo "grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='.tx' $moreoptions --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'"
+ grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='.tx' $moreoptions --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'
fi
# To convert
if [ "x$1" = "xfix" ]
then
- for fic in `grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='includes' --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'`
+ for fic in `grep -rlIZ --include='*.php' --include='*.sh' --include='*.pl' --include='*.lang' --include='*.txt' --exclude-dir='.git' --exclude-dir='.tx' $moreoptions --exclude-dir='custom' . . | xargs -0 awk '/^\xEF\xBB\xBF/ {print FILENAME} {nextfile}'`
do
echo "Fixing $fic"
sed -i '1s/^\xEF\xBB\xBF//' $fic
diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php
index 524e6c04e7a..81a5227e575 100644
--- a/htdocs/adherents/card_subscriptions.php
+++ b/htdocs/adherents/card_subscriptions.php
@@ -700,7 +700,7 @@ if ($rowid)
{
$objp = $db->fetch_object($result);
$var=!$var;
- print "
";
+ print " ";
$cotisationstatic->ref=$objp->crowid;
$cotisationstatic->id=$objp->crowid;
print ''.$cotisationstatic->getNomUrl(1).' ';
diff --git a/htdocs/adherents/cotisations.php b/htdocs/adherents/cotisations.php
index ad71332eff2..1175f22536c 100644
--- a/htdocs/adherents/cotisations.php
+++ b/htdocs/adherents/cotisations.php
@@ -136,7 +136,7 @@ if ($result)
print " \n";
foreach ($AdherentType as $key => $adhtype)
{
$var=!$var;
- print "";
+ print " ";
print ''.$adhtype->getNomUrl(1, dol_size(32)).' ';
print ''.(isset($MemberToValidate[$key]) && $MemberToValidate[$key] > 0?$MemberToValidate[$key]:'').' '.$staticmember->LibStatut(-1,$adhtype->cotisation,0,3).' ';
print ''.(isset($MembersValidated[$key]) && ($MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0) > 0) ? $MembersValidated[$key]-(isset($MemberUpToDate[$key])?$MemberUpToDate[$key]:0):'').' '.$staticmember->LibStatut(1,$adhtype->cotisation,0,3).' ';
@@ -402,7 +402,7 @@ krsort($Total);
foreach ($Total as $key=>$value)
{
$var=!$var;
- print " ";
+ print " ";
print "$key ";
print "".$Number[$key]." ";
print "".price($value)." ";
diff --git a/htdocs/admin/osc-languages.php b/htdocs/admin/osc-languages.php
index 0d6df08a8b7..83446034f0d 100644
--- a/htdocs/admin/osc-languages.php
+++ b/htdocs/admin/osc-languages.php
@@ -72,7 +72,7 @@ if ($resql)
while ($i < $num) {
$objp = $db->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print "$objp->languages_id \n";
print "$objp->name \n";
print "$objp->code \n";
diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php
index 7e82bab5e3f..eb638b68711 100644
--- a/htdocs/admin/system/database-tables.php
+++ b/htdocs/admin/system/database-tables.php
@@ -103,7 +103,7 @@ else
{
$obj = $db->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print ''.$obj->Name.' ';
print ''.$obj->Engine.' ';
@@ -156,7 +156,7 @@ else
{
$row = $db->fetch_row($resql);
$var=!$var;
- print " ";
+ print " ";
print ''.$row[0].' ';
print ''.$row[1].' ';
print ''.$row[2].' ';
diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php
index f5eaaaa4ea4..fe182c2e73e 100644
--- a/htdocs/admin/system/dbtable.php
+++ b/htdocs/admin/system/dbtable.php
@@ -112,7 +112,7 @@ else
{
$row = $db->fetch_row($resql);
$var=!$var;
- print " ";
+ print " ";
print "$row[0] ";
print "$row[1] ";
diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php
index 0baed9e53bc..73fd45d9099 100644
--- a/htdocs/admin/system/modules.php
+++ b/htdocs/admin/system/modules.php
@@ -106,7 +106,7 @@ foreach($sortorder as $numero=>$name)
$idperms="";
$var=!$var;
// Module
- print " ";
+ print " ";
$alt=$name.' - '.$modules_files[$numero];
if (! empty($picto[$numero]))
{
diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php
index 780e4427078..b4ca64c95a5 100644
--- a/htdocs/admin/tools/listsessions.php
+++ b/htdocs/admin/tools/listsessions.php
@@ -145,7 +145,7 @@ if ($savehandler == 'files')
{
$var=!$var;
- print " ";
+ print " ";
// Login
print ''.$sessionentry['login'].' ';
diff --git a/htdocs/bookmarks/liste.php b/htdocs/bookmarks/liste.php
index c3634b6c726..c322360fb4a 100644
--- a/htdocs/bookmarks/liste.php
+++ b/htdocs/bookmarks/liste.php
@@ -103,7 +103,7 @@ if ($resql)
$obj = $db->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
// Id
print '';
diff --git a/htdocs/boutique/client/fiche.php b/htdocs/boutique/client/fiche.php
index feaf7d2068e..31d7bf3e81e 100644
--- a/htdocs/boutique/client/fiche.php
+++ b/htdocs/boutique/client/fiche.php
@@ -80,7 +80,7 @@ if ($id > 0)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print ' ';
diff --git a/htdocs/boutique/client/index.php b/htdocs/boutique/client/index.php
index 8b67d4311f5..82eb9ef4bb0 100644
--- a/htdocs/boutique/client/index.php
+++ b/htdocs/boutique/client/index.php
@@ -70,7 +70,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print "";
+ print " ";
print ''.$objp->customers_firstname." \n";
print ''.$objp->customers_lastname." \n";
print "$objp->customers_email_address \n";
diff --git a/htdocs/boutique/commande/ca.php b/htdocs/boutique/commande/ca.php
index c8f170af15c..b5f4bab9e1c 100644
--- a/htdocs/boutique/commande/ca.php
+++ b/htdocs/boutique/commande/ca.php
@@ -66,7 +66,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print 'Somme des commandes ';
print ''.price($objp->value).' ';
@@ -94,7 +94,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print 'Somme des frais de port ';
print ''.price($objp->value).' ';
$i++;
diff --git a/htdocs/boutique/commande/fiche.php b/htdocs/boutique/commande/fiche.php
index e7f0e83537f..e00f9007940 100644
--- a/htdocs/boutique/commande/fiche.php
+++ b/htdocs/boutique/commande/fiche.php
@@ -86,7 +86,7 @@ if ($id > 0)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print "";
+ print " ";
print '';
print ' ';
diff --git a/htdocs/boutique/commande/index.php b/htdocs/boutique/commande/index.php
index 382ecba6600..c5d166cf4e4 100644
--- a/htdocs/boutique/commande/index.php
+++ b/htdocs/boutique/commande/index.php
@@ -69,7 +69,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print ' ';
print $objp->orders_id ."";
diff --git a/htdocs/boutique/critiques/bestproduct.php b/htdocs/boutique/critiques/bestproduct.php
index 45e3fba2a88..556c1926979 100644
--- a/htdocs/boutique/critiques/bestproduct.php
+++ b/htdocs/boutique/critiques/bestproduct.php
@@ -74,7 +74,7 @@ if ($resql)
while ($i < $num) {
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print ''.$objp->products_model.' ';
print ''.$objp->rat." \n";
print ''.$objp->products_quantity." \n";
diff --git a/htdocs/boutique/critiques/index.php b/htdocs/boutique/critiques/index.php
index fd6bdb528f4..186756f6e42 100644
--- a/htdocs/boutique/critiques/index.php
+++ b/htdocs/boutique/critiques/index.php
@@ -70,7 +70,7 @@ if ($resql) {
while ($i < $num) {
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print "".substr($objp->products_name, 0, 30)." \n";
print ''.substr($objp->reviews_text, 0, 40)." ... \n";
print "$objp->reviews_rating \n";
diff --git a/htdocs/boutique/index.php b/htdocs/boutique/index.php
index 0e791515f09..91301c69dec 100644
--- a/htdocs/boutique/index.php
+++ b/htdocs/boutique/index.php
@@ -70,7 +70,7 @@ if ($result)
{
$objp = $dbosc->fetch_object($result);
$var=!$var;
- print " ";
+ print " ";
print ''.$objp->mois.' ';
print ''.price($objp->value).' ';
diff --git a/htdocs/boutique/notification/index.php b/htdocs/boutique/notification/index.php
index 62fbe0ce597..3a27326e1fb 100644
--- a/htdocs/boutique/notification/index.php
+++ b/htdocs/boutique/notification/index.php
@@ -70,7 +70,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print "rowid\">$objp->customers_firstname $objp->customers_lastname \n";
print ''.$objp->products_name." ";
print " \n";
diff --git a/htdocs/boutique/notification/produits.php b/htdocs/boutique/notification/produits.php
index 18f66b696e7..eb897497540 100644
--- a/htdocs/boutique/notification/produits.php
+++ b/htdocs/boutique/notification/produits.php
@@ -71,7 +71,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print "";
+ print " ";
print ''.$objp->products_name." ";
print ''.$objp->nb.' ';
diff --git a/htdocs/boutique/produits/index.php b/htdocs/boutique/produits/index.php
index 71dd2bd8d53..f8bae975445 100644
--- a/htdocs/boutique/produits/index.php
+++ b/htdocs/boutique/produits/index.php
@@ -67,7 +67,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print ''.$objp->customers_firstname." \n";
print ''.$objp->customers_lastname." \n";
print "$objp->customers_email_address \n";
diff --git a/htdocs/boutique/produits/osc-liste.php b/htdocs/boutique/produits/osc-liste.php
index 84084bfde7a..ef1369dd503 100644
--- a/htdocs/boutique/produits/osc-liste.php
+++ b/htdocs/boutique/produits/osc-liste.php
@@ -81,7 +81,7 @@ if ($resql)
{
$objp = $dbosc->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print "$objp->products_id \n";
print "$objp->products_model \n";
print "$objp->products_name \n";
diff --git a/htdocs/boutique/promotion/index.php b/htdocs/boutique/promotion/index.php
index f70b793cd64..7cbba5c5014 100644
--- a/htdocs/boutique/promotion/index.php
+++ b/htdocs/boutique/promotion/index.php
@@ -82,7 +82,7 @@ if ($resql)
$objp = $dbosc->fetch_object($i);
$var=!$var;
- print " ";
+ print " ";
print ''.$objp->products_model." ";
print ''.$objp->products_name." ";
diff --git a/htdocs/comm/action/contact.php b/htdocs/comm/action/contact.php
index 87a13f28c55..6baafcaf036 100644
--- a/htdocs/comm/action/contact.php
+++ b/htdocs/comm/action/contact.php
@@ -264,7 +264,7 @@ if ($id > 0 || ! empty($ref))
print ' ';
// Ligne ajout pour contact interne
- print " ";
+ print " ";
print '';
print img_object('','user').' '.$langs->trans("Users");
diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php
index 2fdf9315712..ebe68fa3328 100644
--- a/htdocs/comm/action/listactions.php
+++ b/htdocs/comm/action/listactions.php
@@ -260,7 +260,7 @@ if ($resql)
$var=!$var;
- print " ";
+ print " ";
// Action (type)
print '';
diff --git a/htdocs/comm/bookmark.php b/htdocs/comm/bookmark.php
index dff26cb2618..1b5b1100736 100644
--- a/htdocs/comm/bookmark.php
+++ b/htdocs/comm/bookmark.php
@@ -122,7 +122,7 @@ if ($resql)
$obj = $db->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
//print "" . ($i + 1 + ($limit * $page)) . " ";
print "".$obj->bid." ";
print "".img_object($langs->trans("ShowUser"),"user").' '.$obj->lastname." ".$obj->firstname." \n";
diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php
index e55f88de7aa..4281eab9cb1 100644
--- a/htdocs/comm/contact.php
+++ b/htdocs/comm/contact.php
@@ -156,7 +156,7 @@ if ($resql)
$var=!$var;
- print " ";
+ print " ";
print ''.img_object($langs->trans("ShowContact"),"contact");
print ' '.$obj->name.' ';
print "$obj->firstname ";
diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php
index c785704d456..811e4a8d211 100644
--- a/htdocs/comm/fiche.php
+++ b/htdocs/comm/fiche.php
@@ -626,7 +626,7 @@ if ($id > 0)
$objp = $db->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print '';
$contrat->id=$objp->id;
$contrat->ref=$objp->ref?$objp->ref:$objp->id;
@@ -748,7 +748,7 @@ if ($id > 0)
{
$objp = $db->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print '';
$facturestatic->id=$objp->facid;
$facturestatic->ref=$objp->facnumber;
diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php
index 28696228e45..0c989fa5388 100755
--- a/htdocs/comm/list.php
+++ b/htdocs/comm/list.php
@@ -233,7 +233,7 @@ if ($result)
$var=!$var;
- print " ";
+ print " ";
print '';
$thirdpartystatic->id=$obj->rowid;
$thirdpartystatic->name=$obj->name;
diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php
index 3c7d425feb1..538d4c04fc4 100644
--- a/htdocs/comm/mailing/cibles.php
+++ b/htdocs/comm/mailing/cibles.php
@@ -450,7 +450,7 @@ if ($object->fetch($id) >= 0)
$obj = $db->fetch_object($resql);
$var=!$var;
- print " ";
+ print " ";
print ''.$obj->email.' ';
print ''.$obj->lastname.' ';
print ''.$obj->firstname.' ';
diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php
index 088ee43a02a..42944afabef 100644
--- a/htdocs/comm/mailing/index.php
+++ b/htdocs/comm/mailing/index.php
@@ -175,7 +175,7 @@ if ($result)
$obj = $db->fetch_object($result);
$var=!$var;
- print " ";
+ print " ";
print ''.img_object($langs->trans("ShowEMail"),"email").' '.$obj->rowid.' ';
print ''.dol_trunc($obj->titre,38).' ';
print ''.dol_print_date($db->jdate($obj->date_creat),'day').' ';
diff --git a/htdocs/comm/mailing/liste.php b/htdocs/comm/mailing/liste.php
index b05f859f54e..41a4e57a7ac 100644
--- a/htdocs/comm/mailing/liste.php
+++ b/htdocs/comm/mailing/liste.php
@@ -136,7 +136,7 @@ if ($result)
$var=!$var;
- print " ";
+ print " ";
print '';
print img_object($langs->trans("ShowEMail"),"email").' '.stripslashes($obj->rowid).' ';
print ''.$obj->titre.' ';
diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php
index 78f57e15f14..2fd7c86fb9a 100644
--- a/htdocs/comm/propal/apercu.php
+++ b/htdocs/comm/propal/apercu.php
@@ -140,7 +140,7 @@ if ($id > 0 || ! empty($ref))
print_titre($langs->trans("Documents"));
print '';
- print "".$langs->trans("Propal")." PDF ";
+ print "".$langs->trans("Propal")." PDF ";
print ''.$object->ref.'.pdf ';
diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php
index 2a31d4a48b7..70eb2e49092 100644
--- a/htdocs/comm/propal/index.php
+++ b/htdocs/comm/propal/index.php
@@ -180,7 +180,7 @@ if (! empty($conf->propal->enabled))
{
$var=!$var;
$obj = $db->fetch_object($resql);
- print "";
+ print " ";
$propalstatic->id=$obj->rowid;
$propalstatic->ref=$obj->ref;
@@ -241,7 +241,7 @@ if ($resql)
$var=!$var;
$obj = $db->fetch_object($resql);
- print " ";
+ print " ";
print '';
$propalstatic->id=$obj->rowid;
@@ -402,7 +402,7 @@ if (! empty($conf->propal->enabled))
{
$var=!$var;
$obj = $db->fetch_object($resql);
- print " ";
+ print " ";
print '';
$propalstatic->id=$obj->rowid;
@@ -474,7 +474,7 @@ if (! empty($conf->propal->enabled))
{
$var=!$var;
$obj = $db->fetch_object($resql);
- print " ";
+ print " ";
print '';
$propalstatic->id=$obj->rowid;
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index 136a1fac354..c3cc5fbb7cb 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -211,7 +211,6 @@ if ($result)
{
$objectstatic=new Propal($db);
$userstatic=new User($db);
-
$num = $db->num_rows($result);
if ($socid)
@@ -394,6 +393,25 @@ if ($result)
$i++;
}
+
+ if ($total>0)
+ {
+ if($num<$limit){
+ $var=!$var;
+ print ' '.$langs->trans("Total HT").' ';
+ print ''.price($total).' ';
+ print ' ';
+ }
+ else
+ {
+ $var=!$var;
+ print ''.$langs->trans("Total HT for this page").' ';
+ print ''.price($total).' ';
+ print ' ';
+ }
+
+ }
+
print '
';
print '';
diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php
index 56dec89394d..cfa83e78875 100644
--- a/htdocs/comm/remx.php
+++ b/htdocs/comm/remx.php
@@ -338,7 +338,7 @@ if ($socid > 0)
{
$obj = $db->fetch_object($resql);
$var = !$var;
- print " ";
+ print " ";
print ''.dol_print_date($db->jdate($obj->dc),'dayhour').' ';
if ($obj->description == '(CREDIT_NOTE)')
{
@@ -384,7 +384,7 @@ if ($socid > 0)
if ($_GET["action"]=='split' && $_GET['remid'] == $obj->rowid)
{
- print " ";
+ print " ";
print '';
$amount1=price2num($obj->amount_ttc/2,'MT');
$amount2=($obj->amount_ttc-$amount1);
@@ -495,7 +495,7 @@ if ($socid > 0)
{
$obj = array_shift($tab_sqlobj);
$var = !$var;
- print " ";
+ print " ";
print ''.dol_print_date($db->jdate($obj->dc),'dayhour').' ';
if ($obj->description == '(CREDIT_NOTE)')
{
diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php
index f92a309a53c..b4b92e760c5 100644
--- a/htdocs/commande/apercu.php
+++ b/htdocs/commande/apercu.php
@@ -126,7 +126,7 @@ if ($id > 0 || ! empty($ref))
print_titre($langs->trans("Documents"));
print '';
- print "".$langs->trans("Order")." PDF ";
+ print "".$langs->trans("Order")." PDF ";
print ''.$object->ref.'.pdf ';
print ''.dol_print_size(dol_filesize($file)).' ';
@@ -137,7 +137,7 @@ if ($id > 0 || ! empty($ref))
// TODO obsolete ?
if (file_exists($filedetail))
{
- print "Commande detaillee ";
+ print "Commande detaillee ";
print ''.$object->ref.'-detail.pdf ';
print ''.dol_print_size(dol_filesize($filedetail)).' ';
diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php
index bc04697f93f..35a5891d604 100755
--- a/htdocs/commande/customer.php
+++ b/htdocs/commande/customer.php
@@ -154,7 +154,7 @@ if ($resql)
$var=!$var;
- print "";
+ print " ";
print '';
$result='';
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index d9f5cca0415..3c69388c8c9 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -194,7 +194,7 @@ if (! empty($conf->commande->enabled))
{
$var=!$var;
$obj = $db->fetch_object($resql);
- print " ";
+ print " ";
print '';
print "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref." ";
print ''.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).' ';
@@ -246,7 +246,7 @@ if ($resql)
$var=!$var;
$obj = $db->fetch_object($resql);
- print "";
+ print " ";
print '';
$commandestatic->id=$obj->rowid;
@@ -315,7 +315,7 @@ if (! empty($conf->commande->enabled))
{
$var=!$var;
$obj = $db->fetch_object($resql);
- print " ";
+ print " ";
print '';
$commandestatic->id=$obj->rowid;
@@ -386,7 +386,7 @@ if (! empty($conf->commande->enabled))
{
$var=!$var;
$obj = $db->fetch_object($resql);
- print " ";
+ print " ";
print '';
$commandestatic->id=$obj->rowid;
diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 5c9edf478e1..80b71d1d919 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -55,13 +55,17 @@ $result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtyp
$paiementtype=GETPOST('paiementtype','alpha',3);
$req_nb=GETPOST("req_nb",'',3);
$thirdparty=GETPOST("thirdparty",'',3);
+$req_desc=GETPOST("req_desc",'',3);
+$req_debit=GETPOST("req_debit",'',3);
+$req_credit=GETPOST("req_credit",'',3);
+
$vline=GETPOST("vline");
$page=GETPOST('page','int');
$negpage=GETPOST('negpage','int');
if ($negpage)
{
- $page=$_GET["nbpage"] - $negpage;
- if ($page > $_GET["nbpage"]) $page = $_GET["nbpage"];
+ $page=GETPOST("nbpage") - $negpage;
+ if ($page > GETPOST("nbpage")) $page = GETPOST("nbpage");
}
$mesg='';
@@ -186,22 +190,22 @@ if ($id > 0 || ! empty($ref))
$param.='&req_nb='.urlencode($req_nb);
$mode_search = 1;
}
- if (GETPOST("req_desc"))
+ if ($req_desc)
{
- $sql_rech.= " AND b.label LIKE '%".$db->escape(GETPOST("req_desc"))."%'";
- $param.='&req_desc='.urlencode(GETPOST("req_desc"));
+ $sql_rech.= " AND b.label LIKE '%".$db->escape($req_desc)."%'";
+ $param.='&req_desc='.urlencode($req_desc);
$mode_search = 1;
}
- if (GETPOST("req_debit"))
+ if ($req_debit != '')
{
- $sql_rech.=" AND b.amount = -".price2num(GETPOST("req_debit"));
- $param.='&req_debit='.urlencode(GETPOST("req_debit"));
+ $sql_rech.=" AND b.amount = -".price2num($req_debit);
+ $param.='&req_debit='.urlencode($req_debit);
$mode_search = 1;
}
- if (GETPOST("req_credit"))
+ if ($req_credit != '')
{
- $sql_rech.=" AND b.amount = ".price2num(GETPOST("req_credit"));
- $param.='&req_credit='.urlencode(GETPOST("req_credit"));
+ $sql_rech.=" AND b.amount = ".price2num($req_credit);
+ $param.='&req_credit='.urlencode($req_credit);
$mode_search = 1;
}
if ($thirdparty)
@@ -265,6 +269,7 @@ if ($id > 0 || ! empty($ref))
$head=bank_prepare_head($object);
dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account');
+
print '';
$linkback = ''.$langs->trans("BackToList").' ';
@@ -288,28 +293,32 @@ if ($id > 0 || ! empty($ref))
/**
* Search form
*/
- $param.='&account='.$object->id;
+ $param.='&account='.$object->id.'&vline='.$vline;
// Define transaction list navigation string
- $navig = '";
- print ' '."\n";
+ print ' '."\n";
}
/*
@@ -412,14 +415,14 @@ if ($id > 0 || ! empty($ref))
print $form->select_types_paiements($paiementtype,'paiementtype',$filtertype,2,1,1,8);
print '';
print ' ';
- print ' ';
+ print ' ';
print ' ';
- print ' ';
- print ' ';
+ print ' ';
+ print ' ';
print ' ';
print ' ';
print "\n";
- print "\n";
+
/*
* Another solution
@@ -674,7 +677,7 @@ if ($id > 0 || ! empty($ref))
}
// Balance
- if ($action != 'search')
+ if (! $mode_search)
{
if ($total >= 0)
{
@@ -759,7 +762,10 @@ if ($id > 0 || ! empty($ref))
print "
";
- print "\n\n";
+ print "\n";
+
+ dol_fiche_end();
+
/*
* Boutons actions
@@ -773,7 +779,7 @@ if ($id > 0 || ! empty($ref))
{
if ($user->rights->banque->consolidate)
{
- print ''.$langs->trans("Conciliate").' ';
+ print ''.$langs->trans("Conciliate").' ';
}
else
{
@@ -785,7 +791,7 @@ if ($id > 0 || ! empty($ref))
{
if ($user->rights->banque->modifier)
{
- print 'id.'&page='.$page.'">'.$langs->trans("AddBankRecord").' ';
+ print 'id.'&page='.$page.($vline?'&vline='.$vline:'').'">'.$langs->trans("AddBankRecord").' ';
}
else
{
diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php
index a5e6605ad85..e3942381d1e 100644
--- a/htdocs/compta/bank/bilan.php
+++ b/htdocs/compta/bank/bilan.php
@@ -69,22 +69,22 @@ print " \n";
$var=!$var;
$sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."paiement";
$paiem = valeur($sql);
-print "Somme des paiements (associes a une facture) ".price($paiem)." ";
+print "Somme des paiements (associes a une facture) ".price($paiem)." ";
$var=!$var;
$sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount > 0";
$credits = valeur($sql);
-print "Somme des credits ".price($credits)." ";
+print "Somme des credits ".price($credits)." ";
$var=!$var;
$sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount < 0";
$debits = valeur($sql);
-print "Somme des debits ".price($debits)." ";
+print "Somme des debits ".price($debits)." ";
$var=!$var;
$sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank ";
$solde = valeur($sql);
-print "".$langs->trans("BankBalance")." ".price($solde)." ";
+print "".$langs->trans("BankBalance")." ".price($solde)." ";
print "
";
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index b62ea51118c..c76e35a5ed8 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -295,7 +295,7 @@ else
$total = $total + $objp->amount;
$var=!$var;
- print " ";
+ print " ";
// Date operation
print ''.dol_print_date($db->jdate($objp->do),"day").' ';
diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php
index ea7d29beb0f..9a3a55bfaf4 100644
--- a/htdocs/compta/bank/search.php
+++ b/htdocs/compta/bank/search.php
@@ -206,7 +206,7 @@ if ($resql)
if ($printline) {
$var=!$var;
- print " ";
+ print " ";
// Ref
print '';
diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php
index 2c26a5d6361..909417d0e71 100644
--- a/htdocs/compta/charges/index.php
+++ b/htdocs/compta/charges/index.php
@@ -132,7 +132,7 @@ if ($resql)
{
$obj = $db->fetch_object($resql);
$var = !$var;
- print " ";
+ print " ";
// Date
$date=$obj->periode;
if (empty($date)) $date=$obj->date_ech;
@@ -220,7 +220,7 @@ if (empty($_GET["mode"]) || $_GET["mode"] != 'sconly')
$total = $total + $obj->amount;
$var=!$var;
- print " ";
+ print " ";
print ''.dol_print_date($db->jdate($obj->dm),'day').' ? '."\n";
print "".$obj->label." \n";
diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php
index 96fd0231efb..f54f893d79c 100644
--- a/htdocs/compta/clients.php
+++ b/htdocs/compta/clients.php
@@ -185,7 +185,7 @@ if ($resql)
$var=!$var;
- print " ";
+ print " ";
print '';
$thirdpartystatic->id=$obj->rowid;
$thirdpartystatic->nom=$obj->nom;
diff --git a/htdocs/compta/dons/stats.php b/htdocs/compta/dons/stats.php
index affbab7d56f..b2f71859831 100644
--- a/htdocs/compta/dons/stats.php
+++ b/htdocs/compta/dons/stats.php
@@ -63,12 +63,12 @@ if ($result)
print ' '.$langs->trans("Parameter").' '.$langs->trans("Value").' ';
$var=!$var;
- print "";
+ print " ";
print ''.$langs->trans("DonationsNumber").' '.$num.' ';
$var=!$var;
- print "".''.$langs->trans("AmountTotal").' '.price($total).' ';
+ print " ".''.$langs->trans("AmountTotal").' '.price($total).' ';
$var=!$var;
- print " ".''.$langs->trans("Average").' '.price($total / ($num?$num:1)).' ';
+ print " ".''.$langs->trans("Average").' '.price($total / ($num?$num:1)).' ';
print " ";
print "";
diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php
index 2adb3941595..ab508e50035 100644
--- a/htdocs/compta/facture/apercu.php
+++ b/htdocs/compta/facture/apercu.php
@@ -316,7 +316,7 @@ if ($id > 0 || ! empty($ref))
print_titre($langs->trans("Documents"));
print ' ";
$i++;
}
$var=!$var;
- print " Facture a encaisser : ".price($total_ttc_Rac)." <-- bug ici car n'exclut pas le deja r�gl� des factures partiellement r�gl�es ";
+ print "Facture a encaisser : ".price($total_ttc_Rac)." <-- bug ici car n'exclut pas le deja r�gl� des factures partiellement r�gl�es ";
}
$db->free($resql);
}
@@ -489,7 +489,7 @@ print "";
$i++;
}
$var=!$var;
- print "Signe et non facture: ".price($total_pr)." <-- bug ici, ca devrait exclure le deja facture ";
+ print "Signe et non facture: ".price($total_pr)." <-- bug ici, ca devrait exclure le deja facture ";
}
$db->free($resql);
}
@@ -497,7 +497,7 @@ print "";
{
dol_print_error($db);
}
- print "Total CA previsionnel : ".price($total_CA)." <-- bug ici car bug sur les 2 precedents ";
+ print "Total CA previsionnel : ".price($total_CA)." <-- bug ici car bug sur les 2 precedents ";
}
print "";
diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php
index a5e0e7fdbb9..83f248a39be 100644
--- a/htdocs/compta/tva/clients.php
+++ b/htdocs/compta/tva/clients.php
@@ -284,7 +284,7 @@ if (is_array($coll_list))
$intra = '';
}
}
- print "";
+ print " ";
print "".$i." ";
$company_static->id=$coll->socid;
$company_static->nom=$coll->nom;
diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php
index 354d8c86535..7f23b6cfded 100644
--- a/htdocs/compta/tva/index.php
+++ b/htdocs/compta/tva/index.php
@@ -157,7 +157,7 @@ for ($m = 1 ; $m < 13 ; $m++ )
}
$var=!$var;
- print " ";
+ print " ";
print ''.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").' ';
$x_coll = 0;
diff --git a/htdocs/compta/tva/quadri.php b/htdocs/compta/tva/quadri.php
index 393a9ee4efc..d283f877817 100644
--- a/htdocs/compta/tva/quadri.php
+++ b/htdocs/compta/tva/quadri.php
@@ -261,7 +261,7 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES")
$x_paye_ht = 0;
foreach($x_both as $rate => $both){
$var=!$var;
- print " ";
+ print " ";
print "$rate% ";
print "".price($both['coll']['totalht'])." ";
print "".price($both['coll']['vat'])." ";
@@ -284,7 +284,7 @@ if ($conf->global->COMPTA_MODE == "CREANCES-DETTES")
$subtotal = $subtotal + $diff;
$var=!$var;
- print " ";
+ print " ";
print ' ';
print "".price($diff)." \n";
print " \n";
diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php
index 85d3fa4736a..4ca5f298514 100644
--- a/htdocs/compta/tva/reglement.php
+++ b/htdocs/compta/tva/reglement.php
@@ -70,7 +70,7 @@ if ($result)
{
$obj = $db->fetch_object($result);
$var=!$var;
- print "";
+ print " ";
$tva_static->id=$obj->rowid;
$tva_static->ref=$obj->rowid;
diff --git a/htdocs/compta/ventilation/fournisseur/lignes.php b/htdocs/compta/ventilation/fournisseur/lignes.php
index 513736cbe59..0a27fb3ddaa 100644
--- a/htdocs/compta/ventilation/fournisseur/lignes.php
+++ b/htdocs/compta/ventilation/fournisseur/lignes.php
@@ -89,7 +89,7 @@ if ($result)
{
$objp = $db->fetch_object($result);
$var=!$var;
- print " ";
+ print " ";
print ''.$objp->facnumber.' ';
diff --git a/htdocs/compta/ventilation/fournisseur/liste.php b/htdocs/compta/ventilation/fournisseur/liste.php
index a3290dac20f..83256709771 100644
--- a/htdocs/compta/ventilation/fournisseur/liste.php
+++ b/htdocs/compta/ventilation/fournisseur/liste.php
@@ -74,7 +74,7 @@ if ($result)
{
$objp = $db->fetch_object($result);
$var=!$var;
- print " ";
+ print " ";
print ''.$objp->facnumber.' ';
print ''.stripslashes(nl2br($objp->description)).' ';
diff --git a/htdocs/compta/ventilation/lignes.php b/htdocs/compta/ventilation/lignes.php
index c938e9774c4..e8578e7dcf0 100644
--- a/htdocs/compta/ventilation/lignes.php
+++ b/htdocs/compta/ventilation/lignes.php
@@ -104,7 +104,7 @@ if ($result)
$var=!$var;
$codeCompta = $objp->numero.' '.$objp->intitule;
- print " ";
+ print " ";
// Ref facture
$facture_static->ref=$objp->facnumber;
diff --git a/htdocs/compta/ventilation/liste.php b/htdocs/compta/ventilation/liste.php
index 81613640541..4cfe167d60c 100644
--- a/htdocs/compta/ventilation/liste.php
+++ b/htdocs/compta/ventilation/liste.php
@@ -88,7 +88,7 @@ if ($result)
{
$objp = $db->fetch_object($result);
$var=!$var;
- print " ";
+ print " ";
// Ref facture
$facture_static->ref=$objp->facnumber;
diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php
index 5787b23463e..036b99f9ae3 100644
--- a/htdocs/contact/class/contact.class.php
+++ b/htdocs/contact/class/contact.class.php
@@ -107,7 +107,7 @@ class Contact extends CommonObject
$this->db->begin();
// Clean parameters
- $this->lastname=$this->lastname?trim($this->lastname):$this->lastname;
+ $this->lastname=$this->lastname?trim($this->lastname):trim($this->name);
$this->firstname=trim($this->firstname);
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->lastname=ucwords($this->lastname);
if (! empty($conf->global->MAIN_FIRST_TO_UPPER)) $this->firstname=ucwords($this->firstname);
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index aa7923926e0..eefbd4b73c6 100755
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -318,7 +318,7 @@ if ($result)
$var=!$var;
- print " ";
+ print " ";
// Name
print '';
diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php
index fa9c99a8571..4989fc98440 100644
--- a/htdocs/contrat/fiche.php
+++ b/htdocs/contrat/fiche.php
@@ -1244,7 +1244,7 @@ else
print ' ';
print ' ';
// Ligne carac
- print " ";
+ print " ";
print '';
if ($objp->fk_product)
{
@@ -1285,7 +1285,7 @@ else
print ' ';
print ' ';
// Ligne dates prevues
- print " ";
+ print " ";
print '';
print $langs->trans("DateStartPlanned").' ';
$form->select_date($db->jdate($objp->date_debut),"date_start_update",$usehm,$usehm,($db->jdate($objp->date_debut)>0?0:1),"update");
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 4a07469c0ce..2b405d9c87f 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -64,6 +64,7 @@ abstract class CommonObject
{
global $conf;
+ //print "lastname=".$this->lastname." name=".$this->name." nom=".$this->nom." \n";
$lastname=$this->lastname;
$firstname=$this->firstname;
if (empty($lastname)) $lastname=($this->lastname?$this->lastname:($this->name?$this->name:$this->nom));
diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php
index c1add1087e2..1ade18a2968 100644
--- a/htdocs/core/class/dolprintipp.class.php
+++ b/htdocs/core/class/dolprintipp.class.php
@@ -166,7 +166,7 @@ class dolprintIPP
foreach ($jobs as $value )
{
$var=!$var;
- print " ";
+ print " ";
print ''.$value->job_id->_value0.' ';
print ''.$value->job_originating_user_name->_value0.' ';
print ''.$value->printer_uri->_value0.' ';
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 4e1ca4e3bbb..0d0a1857427 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1076,11 +1076,12 @@ class Form
* @param array $exclude Array list of users id to exclude
* @param int $disabled If select list must be disabled
* @param array $include Array list of users id to include
- * @param int $enableonly Array list of users id to be enabled. All other must be disabled
+ * @param array $enableonly Array list of users id to be enabled. All other must be disabled
* @param int $force_entity 0 or Id of environment to force
+ * @param int $maxlength Maximum length of string into list (0=no limit)
* @return string HTML select string
*/
- function select_dolusers($selected='',$htmlname='userid',$show_empty=0,$exclude='',$disabled=0,$include='',$enableonly='',$force_entity=0)
+ function select_dolusers($selected='', $htmlname='userid', $show_empty=0, $exclude='', $disabled=0, $include='', $enableonly='', $force_entity=0, $maxlength=0)
{
global $conf,$user,$langs;
@@ -1161,7 +1162,8 @@ class Form
if ($disableline) $out.= ' disabled="disabled"';
$out.= '>';
}
- $out.= $userstatic->getFullName($langs);
+
+ $out.= $userstatic->getFullName($langs, 0, 0, $maxlength);
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
{
@@ -2685,7 +2687,7 @@ class Form
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
-
+
$formproject=new FormProjets($this->db);
$langs->load("project");
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 7e47e467386..10a23a58ac3 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -156,5 +156,67 @@ class FormProjets
return -1;
}
}
+
+ /**
+ * Build Select List of element associable to a project
+ *
+ * @param TableName Table of the element to update
+ * @return string The HTML select list of element
+ */
+ function select_element($table_element)
+ {
+
+ $projectkey="fk_projet";
+ switch ($table_element)
+ {
+ case "facture":
+ $sql = "SELECT rowid, facnumber as ref";
+ break;
+ case "facture_fourn":
+ $sql = "SELECT rowid, ref";
+ break;
+ case "facture_rec":
+ $sql = "SELECT rowid, titre as ref";
+ break;
+ case "actioncomm":
+ $sql = "SELECT id as rowid, label as ref";
+ $projectkey="fk_project";
+ break;
+ default:
+ $sql = "SELECT rowid, ref";
+ break;
+ }
+
+ $sql.= " FROM ".MAIN_DB_PREFIX.$table_element;
+ $sql.= " WHERE ".$projectkey." is null";
+ if (!empty($this->societe->id)) {
+ $sql.= " AND fk_soc=".$this->societe->id;
+ }
+ $sql.= " ORDER BY ref DESC";
+
+ dol_syslog(get_class($this).'::select_element sql='.$sql,LOG_DEBUG);
+
+ $resql=$this->db->query($sql);
+ if ($resql)
+ {
+ $num = $this->db->num_rows($resql);
+ $i = 0;
+ if ($num > 0)
+ {
+ $sellist = '';
+ while ($i < $num)
+ {
+ $obj = $this->db->fetch_object($resql);
+ $sellist .=''.$obj->ref.' ';
+ $i++;
+ }
+ $sellist .=' ';
+ }
+ return $sellist ;
+
+ $this->db->free($resql);
+ }
+ }
+
}
\ No newline at end of file
diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php
index b5f2dfce9c3..ffa06230d20 100644
--- a/htdocs/core/class/translate.class.php
+++ b/htdocs/core/class/translate.class.php
@@ -759,6 +759,7 @@ class Translate
{
$this->load("dict");
$label=array();
+ foreach($this->cache_currencies as $key => $val) $label[$key]=$val['label'];
$num = $db->num_rows($resql);
$i = 0;
@@ -772,9 +773,9 @@ class Translate
$label[$obj->code_iso] = $this->cache_currencies[$obj->code_iso]['label'];
$i++;
}
-
+ //print count($label).' '.count($this->cache_currencies);
array_multisort($label, SORT_ASC, $this->cache_currencies);
-
+ //var_dump($this->cache_currencies); $this->cache_currencies is now sorted onto label
return $num;
}
else
diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php
index f606dea9c8e..d8366a0135d 100644
--- a/htdocs/core/db/pgsql.class.php
+++ b/htdocs/core/db/pgsql.class.php
@@ -177,6 +177,10 @@ class DoliDBPgsql
}
if ($line != "")
{
+ // group_concat support (PgSQL >= 9.1)
+ $line = preg_replace('/GROUP_CONCAT/i', 'STRING_AGG', $line);
+ $line = preg_replace('/ SEPARATOR/i', ',', $line);
+
if ($type == 'auto')
{
if (preg_match('/ALTER TABLE/i',$line)) $type='dml';
diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php
index 6279e4ee9a0..aff4aeceb50 100644
--- a/htdocs/core/lib/company.lib.php
+++ b/htdocs/core/lib/company.lib.php
@@ -92,10 +92,13 @@ function societe_prepare_head($object)
$head[$h][2] = 'note';
$h++;
- $head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
- $head[$h][1] = $langs->trans("Referers");
- $head[$h][2] = 'consumption';
- $h++;
+ if (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled))
+ {
+ $head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
+ $head[$h][1] = $langs->trans("Referers");
+ $head[$h][2] = 'consumption';
+ $h++;
+ }
// Attached files
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
@@ -405,7 +408,9 @@ function show_projects($conf,$langs,$db,$object,$backtopage='')
if (! empty($conf->projet->enabled) && $user->rights->projet->creer)
{
//$buttoncreate=''.$langs->trans("AddProject").' ';
- $buttoncreate=''.$langs->trans("AddProject").' '.img_picto($langs->trans("AddProject"),'filenew').' '."\n";
+ $buttoncreate=''.$langs->trans("AddProject");
+ if (empty($conf->dol_optimize_smallscreen)) $buttoncreate.=' '.img_picto($langs->trans("AddProject"),'filenew');
+ $buttoncreate.=' '."\n";
}
print "\n";
@@ -445,7 +450,7 @@ function show_projects($conf,$langs,$db,$object,$backtopage='')
if ($user->rights->projet->lire && $userAccess > 0)
{
$var = !$var;
- print " ";
+ print " ";
// Ref
print ''.img_object($langs->trans("ShowProject"),($obj->public?'projectpub':'project'))." ".$obj->ref.' ';
diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php
index 0ba077e1a3b..b66060e3607 100644
--- a/htdocs/core/lib/cron.lib.php
+++ b/htdocs/core/lib/cron.lib.php
@@ -22,6 +22,7 @@
* \ingroup cron
*/
+
/**
* Return array of tabs to used on pages to setup cron module.
*
@@ -74,3 +75,53 @@ function cron_prepare_head($object)
return $head;
}
+
+/**
+ * Show information with URLs to launch jobs
+ *
+ * @return int 0
+ */
+function dol_print_cron_urls()
+{
+ global $conf, $langs, $user;
+ global $dolibarr_main_url_root;
+
+ // Define $urlwithroot
+ $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
+ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
+ //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
+
+ // Cron launch
+ print ''.$langs->trans("URLToLaunchCronJobs").': ';
+ $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login;
+ print img_picto('','object_globe.png').' '.$url." \n";
+ print ' '.$langs->trans("OrToLaunchASpecificJob").' ';
+ $url=$urlwithroot.'/public/cron/cron_run_jobs.php'.(empty($conf->global->CRON_KEY)?'':'?securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid';
+ print img_picto('','object_globe.png').' '.$url." \n";
+ print ' ';
+
+
+ print ''.$langs->trans("FileToLaunchCronJobs").': ';
+
+ $file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'securitykey':''.$conf->global->CRON_KEY.'').' '.$user->login.' [cronjobid]';
+ print ' \n";
+ print ' ';
+
+ // Add note
+ $linuxlike=1;
+ if (preg_match('/^win/i',PHP_OS)) $linuxlike=0;
+ if (preg_match('/^mac/i',PHP_OS)) $linuxlike=0;
+ print $langs->trans("Note").': ';
+ if ($linuxlike)
+ {
+ print $langs->trans("CronExplainHowToRunUnix");
+ }
+ else
+ {
+ print $langs->trans("CronExplainHowToRunWin");
+ }
+
+ return 0;
+}
+
+
diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php
index 10dffc40faa..f8cc1493b4b 100644
--- a/htdocs/core/lib/sendings.lib.php
+++ b/htdocs/core/lib/sendings.lib.php
@@ -192,7 +192,7 @@ function show_list_sending_receive($origin,$origin_id,$filter='')
{
$var=!$var;
$objp = $db->fetch_object($resql);
- print " ";
+ print " ";
// Sending id
print ''.img_object($langs->trans("ShowSending"),'sending').' '.$objp->exp_ref.' ';
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index 61ad4e7a935..ceaa41b404c 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -201,9 +201,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/sellsjournal.php?leftmenu=ca', 'SellsJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/journal/purchasesjournal.php?leftmenu=ca', 'PurchasesJournal', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
-- Check deposit
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled && $conf->banque->enabled', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->facture->lire', '', 2, 9, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled && $conf->banque->enabled', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->facture->lire', '', 2, 0, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->facture->enabled && $conf->banque->enabled', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/liste.php?leftmenu=checks', 'List', 1, 'bills', '$user->rights->facture->lire', '', 2, 1, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=bank', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/fiche.php?leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->banque->enabled) && (! empty($conf->facture->enabled)) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON)', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/liste.php?leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__);
-- Withdrawal
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?leftmenu=withdraw&mainmenu=bank', 'StandingOrders', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php
index 97788a14770..ff6a303d5aa 100644
--- a/htdocs/core/menus/standard/auguria_menu.php
+++ b/htdocs/core/menus/standard/auguria_menu.php
@@ -186,7 +186,7 @@ class MenuManager
print ''."\n";
foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
{
- print '