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 "
"; print ''; } - print ""; + print ""; // Ref print ''.$cotisation->getNomUrl(1).''; diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index fd10d0e14de..59ed0b36e84 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -135,15 +135,15 @@ print ''; print ''.$langs->trans("SearchAMember").''; print "\n"; $var=false; -print ""; +print ""; print ''; print $langs->trans("Ref").':'; print ''; -print ""; +print ""; print ''; print $langs->trans("Name").':'; print ''; -print ""; +print ""; print ''; print $langs->trans("Other").':'; print ''; @@ -338,7 +338,7 @@ 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 'Fiche '; 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 'Fiche livre'; 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 'Fiche '; 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 ""; + print ""; print ''; 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 '"; + print ""; print '"; + print ""; print ''; + print ''; + } + else + { + $var=!$var; + print ''; + print ''; + } + + } + print '
".$langs->trans("Propal")." PDF
".$langs->trans("Propal")." PDF'.$object->ref.'.pdf
'; $propalstatic->id=$obj->rowid; @@ -402,7 +402,7 @@ if (! empty($conf->propal->enabled)) { $var=!$var; $obj = $db->fetch_object($resql); - print "
'; $propalstatic->id=$obj->rowid; @@ -474,7 +474,7 @@ if (! empty($conf->propal->enabled)) { $var=!$var; $obj = $db->fetch_object($resql); - 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").''.price($total).''; + print '
'.$langs->trans("Total HT for this page").''.price($total).''; + 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 ""; + print ""; print ''; print ''; @@ -137,7 +137,7 @@ if ($id > 0 || ! empty($ref)) // TODO obsolete ? if (file_exists($filedetail)) { - print ""; + print ""; print ''; print ''; 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 '"; + print ""; print '"; print ''; @@ -246,7 +246,7 @@ if ($resql) $var=!$var; $obj = $db->fetch_object($resql); - print ""; + print ""; print '"; + print ""; print '"; + print ""; print '\n"; $var=!$var; $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."paiement"; $paiem = valeur($sql); -print ""; +print ""; $var=!$var; $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount > 0"; $credits = valeur($sql); -print ""; +print ""; $var=!$var; $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank WHERE amount < 0"; $debits = valeur($sql); -print ""; +print ""; $var=!$var; $sql = "SELECT sum(amount) as amount FROM ".MAIN_DB_PREFIX."bank "; $solde = valeur($sql); -print ""; +print ""; print "
".$langs->trans("Order")." PDF
".$langs->trans("Order")." PDF'.$object->ref.'.pdf'.dol_print_size(dol_filesize($file)).'
Commande detaillee
Commande detaillee'.$object->ref.'-detail.pdf'.dol_print_size(dol_filesize($filedetail)).'
'; $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 "rowid."\">".img_object($langs->trans("ShowOrder"),"order").' '.$obj->ref."'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($obj->nom,24).'
'; $commandestatic->id=$obj->rowid; @@ -315,7 +315,7 @@ if (! empty($conf->commande->enabled)) { $var=!$var; $obj = $db->fetch_object($resql); - print "
'; $commandestatic->id=$obj->rowid; @@ -386,7 +386,7 @@ if (! empty($conf->commande->enabled)) { $var=!$var; $obj = $db->fetch_object($resql); - 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 'nbpage='.$totalPages.' viewline='.$viewline.' limitsql='.$limitsql; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $navig ='
'; if ($limitsql > $viewline) $navig.=''.img_previous().''; - $navig.= $langs->trans("Page")." "; // ' Page '; - $navig.=''; - $navig.=''; - $navig.=''; - $navig.=''; - $navig.=''; - $navig.=''; - $navig.=''; - $navig.=''; - $navig.=''; + $navig.= ' "; // ' Page '; + $navig.=''; $navig.='/'.$totalPages.' '; if ($total_lines > $limitsql ) { $navig.= ''.img_next().''; } - $navig.=''; + $navig.='
'; //var_dump($navig); // Confirmation delete @@ -325,18 +334,12 @@ if ($id > 0 || ! empty($ref)) // Show title if ($action != 'addline' && $action != 'delete') { - print ''; + print ''; } // Form to add a transaction with no invoice if ($user->rights->banque->modifier && $action == 'addline') { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; print ''; print ''; @@ -375,7 +378,7 @@ if ($id > 0 || ! empty($ref)) print ''; print ""; - 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 "
'.$navig.'
'.$navig.'
'.$langs->trans("AddBankRecordLong").'
 
 
 
"; - 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 "
Somme des paiements (associes a une facture)".price($paiem)."
Somme des paiements (associes a une facture)".price($paiem)."
Somme des credits".price($credits)."
Somme des credits".price($credits)."
Somme des debits".price($debits)."
Somme des debits".price($debits)."
".$langs->trans("BankBalance")."".price($solde)."
".$langs->trans("BankBalance")."".price($solde)."
"; 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 ''; - print ""; + print ""; print ''; print ''; @@ -326,7 +326,7 @@ if ($id > 0 || ! empty($ref)) // Si fichier detail PDF existe if (file_exists($filedetail)) // facture detaillee supplementaire { - print ""; + print ""; print ''; print ''; diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 67b36fdc586..f098eee307f 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -437,7 +437,7 @@ else if (! empty($objp->date_end)) $type=1; // Show line - print ""; + print ""; if ($object->lines[$i]->fk_product > 0) { print '"; + print ""; print '\n"; diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index 51432a3e4d2..f86c0603cd6 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -546,7 +546,7 @@ if ($object->id > 0) $obj = $db->fetch_object($result); $var=!$var; - print ""; + print ""; print '\n"; diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index e67e4868dcc..f26b9a06089 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -679,7 +679,7 @@ if (! empty($conf->tax->enabled) && $user->rights->tax->charges->lire) while ($i < $num) { $obj = $db->fetch_object($resql); - print ""; + print ""; $chargestatic->id=$obj->rowid; $chargestatic->ref=$obj->libelle; $chargestatic->lib=$obj->libelle; @@ -762,7 +762,7 @@ if (! empty($conf->facture->enabled) && ! empty($conf->commande->enabled) && $us { $obj = $db->fetch_object($resql); - print ""; + print ""; print '"; + print ""; print ""; $i++; } diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index d82e7fabad9..e2eb5ab610c 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -244,7 +244,7 @@ if (is_array($coll_list)) $intra = ''; } } - print ""; + print ""; print ""; $company_static->id=$coll->socid; $company_static->nom=$coll->nom; diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index 0d46cd7ae11..3f0cb9828d5 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -148,7 +148,7 @@ for ($m = 1 ; $m < 13 ; $m++ ) } $var=!$var; - print ""; + print ""; print ''; $x_coll = 0; diff --git a/htdocs/compta/localtax/reglement.php b/htdocs/compta/localtax/reglement.php index 66c88892325..e750403bf2c 100644 --- a/htdocs/compta/localtax/reglement.php +++ b/htdocs/compta/localtax/reglement.php @@ -66,7 +66,7 @@ if ($result) { $obj = $db->fetch_object($result); $var=!$var; - print ""; + print ""; $localtax_static->id=$obj->rowid; $localtax_static->ref=$obj->rowid; diff --git a/htdocs/compta/paiement/avalider.php b/htdocs/compta/paiement/avalider.php index 03ebf1d40a6..82936395d2a 100644 --- a/htdocs/compta/paiement/avalider.php +++ b/htdocs/compta/paiement/avalider.php @@ -95,7 +95,7 @@ if ($resql) { $objp = $db->fetch_object($resql); $var=!$var; - print ""; + print ""; print ''; print '\n"; print "\n"; diff --git a/htdocs/compta/paiement/cheque/fiche.php b/htdocs/compta/paiement/cheque/fiche.php index 3251b4a1ab6..7cf5d15f3a2 100644 --- a/htdocs/compta/paiement/cheque/fiche.php +++ b/htdocs/compta/paiement/cheque/fiche.php @@ -553,7 +553,7 @@ else $accounts[$objp->bid]=0; $accounts[$objp->bid] += 1; - print ""; + print ""; print ''; print ''; // Date operation print ''; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index 80ea9ea6817..2fd7a970d92 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -126,7 +126,7 @@ if ($resql) $accountstatic->label=$objp->label; $var=!$var; - print "\n"; + print "\n"; print ''; print ''; diff --git a/htdocs/compta/paiement/cheque/liste.php b/htdocs/compta/paiement/cheque/liste.php index 705bc15eb88..1c1cf71b11c 100644 --- a/htdocs/compta/paiement/cheque/liste.php +++ b/htdocs/compta/paiement/cheque/liste.php @@ -111,7 +111,7 @@ if ($resql) { $objp = $db->fetch_object($resql); $var=!$var; - print ""; + print ""; // Num ref cheque print '"; + print ""; print '"; + print ""; //print '\n"; diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 8f2d336defe..1ee076cd170 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -99,7 +99,7 @@ if ($result) $obj = $db->fetch_object($result); $var=!$var; - print "'; diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index 5fcd70b1a9b..2ac44d056fe 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -132,7 +132,7 @@ if ($prev_id) { $row = $db->fetch_row($resql); - print "'; diff --git a/htdocs/compta/prelevement/liste.php b/htdocs/compta/prelevement/liste.php index cd09dc6cf25..ddcf485ac4d 100644 --- a/htdocs/compta/prelevement/liste.php +++ b/htdocs/compta/prelevement/liste.php @@ -141,7 +141,7 @@ if ($result) $var=!$var; - print ""; + print ""; print '\n"; print '"; + print ""; print "\n"; if ($modecompta == 'CREANCES-DETTES') @@ -243,7 +243,7 @@ if ($modecompta != 'CREANCES-DETTES') $objp = $db->fetch_object($result); $var=!$var; - print ""; + print ""; print ""; + print ""; print ''; print ''; } @@ -330,7 +330,7 @@ if ($result) { $objp = $db->fetch_object($result); $var=!$var; - print ""; + print ""; print "\n"; if ($modecompta == 'CREANCES-DETTES') @@ -349,7 +349,7 @@ if ($result) { else { $var=!$var; - print ""; + print ""; print ''; print ''; } @@ -416,7 +416,7 @@ if ($result) { $subtotal_ttc += $obj->amount; $var = !$var; - print ""; + print ""; print ''; if ($modecompta == 'CREANCES-DETTES') print ''; print ''; @@ -426,7 +426,7 @@ if ($result) { } else { $var = !$var; - print ""; + print ""; print ''; print ''; } @@ -493,7 +493,7 @@ if ($result) { $subtotal_ttc += $obj->amount; $var = !$var; - print ""; + print ""; print ''; if ($modecompta == 'CREANCES-DETTES') print ''; @@ -504,7 +504,7 @@ if ($result) { } else { $var = !$var; - print ""; + print ""; print ''; print ''; } @@ -581,7 +581,7 @@ if ($modecompta == 'CREANCES-DETTES') } else { dol_print_error($db); } - print ""; + print ""; print "\n"; print "\n"; print "\n"; @@ -624,7 +624,7 @@ if ($modecompta == 'CREANCES-DETTES') } else { dol_print_error($db); } - print ""; + print ""; print "\n"; print "\n"; print "\n"; @@ -666,7 +666,7 @@ else } else { dol_print_error($db); } - print ""; + print ""; print "\n"; if ($modecompta == 'CREANCES-DETTES') print "\n"; @@ -709,7 +709,7 @@ else { dol_print_error($db); } - print ""; + print ""; print "\n"; if ($modecompta == 'CREANCES-DETTES') print "\n"; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index 2c5f1736d1b..54cb9fc0c42 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -171,7 +171,7 @@ if ($resql) $obj = $db->fetch_object($resql); $var = !$var; - print ""; + print ""; // Ref print '"; + print ""; print ""; for ($annee = $year_start ; $annee <= $year_end ; $annee++) @@ -439,7 +439,7 @@ print "
".$langs->trans("Bill")." PDF
".$langs->trans("Bill")." PDF'.$object->ref.'.pdf'.dol_print_size(dol_filesize($file)). '
Facture detaillee
Facture detaillee'.$object->ref.'-detail.pdf'.dol_print_size(dol_filesize($filedetail)).'
'; @@ -548,7 +548,7 @@ else $objp = $db->fetch_object($result); $var=!$var; - print "
'.img_object($langs->trans("ShowBill"),"bill").' '.$objp->titre; print "
'.dol_print_date($db->jdate($obj->date_demande),'day')."
'; $commandestatic->id=$obj->rowid; @@ -1026,7 +1026,7 @@ if ($resql) $obj = $db->fetch_object($resql); $var=!$var; - print "
".dol_print_date($obj->da,"day")."
".dol_print_date($obj->da,"day")."$obj->libelle $obj->label
".$i."
'.dol_print_date(dol_mktime(0,0,0,$m,1,$y),"%b %Y").'
'.img_object($langs->trans("ShowPayment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."$objp->paiement_type $objp->num_paiement
'.$i.''.dol_print_date($db->jdate($objp->date),'day').''.($objp->num_chq?$objp->num_chq:' ').'
'.$checkdepositstatic->getNomUrl(1).''.dol_print_date($db->jdate($objp->db),'day').'
'; diff --git a/htdocs/compta/paiement/liste.php b/htdocs/compta/paiement/liste.php index db2b3173a1c..cec77401490 100644 --- a/htdocs/compta/paiement/liste.php +++ b/htdocs/compta/paiement/liste.php @@ -180,7 +180,7 @@ if ($resql) { $objp = $db->fetch_object($resql); $var=!$var; - print "
'; $paymentstatic->id=$objp->rowid; diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 09d053c47b2..0b2cc3ea709 100755 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -255,7 +255,7 @@ if ($_GET["action"] == 'create') $var=!$var; - print "
'.$charge->getNomUrl(1)."
"; + print "
"; print $bon->LibStatut($obj->statut,2); print " "; diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index 0e47fd7c109..115902db228 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -254,7 +254,7 @@ if ($result) $obj = $db->fetch_object($result); $var=!$var; - print "
"; + print "
"; $bprev->id=$obj->rowid; $bprev->ref=$obj->ref; print $bprev->getNomUrl(1); diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 115a7829374..74bb3fd12e4 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -157,7 +157,7 @@ if ($result) { $obj = $db->fetch_object($result); - print "
"; + print "
"; print ''; print img_object($langs->trans("ShowBill"),"bill"); @@ -194,7 +194,7 @@ if ($result) if($socid) { - print "
"; + print "
"; print ''.$langs->trans("Total").'
"; + print "
"; print $ligne->LibStatut($row[1],1); diff --git a/htdocs/compta/prelevement/ligne.php b/htdocs/compta/prelevement/ligne.php index 54aaf02841a..a0e2d498ee0 100644 --- a/htdocs/compta/prelevement/ligne.php +++ b/htdocs/compta/prelevement/ligne.php @@ -299,7 +299,7 @@ if ($id) { $obj = $db->fetch_object($result); - print "
"; + print "
"; print ''; print img_object($langs->trans("ShowBill"),"bill"); diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index c322142b6a9..dc8b69ea78d 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -166,7 +166,7 @@ if ($result) { $obj = $db->fetch_object($result); - print "
"; + print "
"; print $ligne->LibStatut($obj->statut,2); print " "; @@ -199,7 +199,7 @@ if ($result) if($socid) { - print "
"; + print "
"; print 'Total
"; + print "
"; print $ligne->LibStatut($obj->statut_ligne,2); print " "; diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 5744ab0eb7b..b307717e4b3 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -101,7 +101,7 @@ if ($result) { $obj = $db->fetch_object($result); - print "
"; + print "
"; print $ligne->LibStatut($obj->statut,2).' '; print ''; diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 418d733dbd4..3da79a89f0c 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -102,7 +102,7 @@ if ($resql) { $row = $db->fetch_row($resql); - print "
"; + print "
"; print $ligne->LibStatut($row[2],1); //print $st[$row[2]]; @@ -202,7 +202,7 @@ if ($resql) { $row = $db->fetch_row($resql); - print "
"; + print "
"; print $Rejet->motifs[$row[2]]; print ''.$row[1]; diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 78c81f9ab9c..609a624adce 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -177,7 +177,7 @@ if ($socid > 0) { $objp = $db->fetch_object($resqlp); //$var=!$var; - print "
'.dol_print_date($db->jdate($objp->dp),'day')."'; print '      '; // Decalage diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index d2dd5630843..882554582c1 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -198,7 +198,7 @@ if ($result) { $objp = $db->fetch_object($result); $var=!$var; - print "
 
 ".$langs->trans("Bills").' '.$objp->nom."
 
 ".$langs->trans("Bills")." ".$langs->trans("Other")." (".$langs->trans("PaymentsNotLinkedToInvoice").")\n"; if ($modecompta == 'CREANCES-DETTES') @@ -266,7 +266,7 @@ if ($modecompta != 'CREANCES-DETTES') if ($total_ttc == 0) { $var=!$var; - print "
 
 '.$langs->trans("None").'
 
 ".$langs->trans("Bills")." socid."\">".$objp->nom."
 
 '.$langs->trans("None").'
 
 '.$obj->nom.''.price(-$obj->amount).''.price(-$obj->amount).'
 
 '.$langs->trans("None").'
 
 '.$obj->nom.''.price(-$obj->amount).'
 
 '.$langs->trans("None").'
 
 ".$langs->trans("VATToPay")." ".price($amount)."
 
 ".$langs->trans("VATToCollect")." ".price($amount)."
 
 ".$langs->trans("VATPaid")."".price($amount)."
 
 ".$langs->trans("VATCollected")."".price($amount)."
'; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index 2d90767cffb..209cdba9563 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -284,7 +284,7 @@ for ($mois = 1+$nb_mois_decalage ; $mois <= 12+$nb_mois_decalage ; $mois++) for ($mois = 1 ; $mois < 13 ; $mois++) { $var=!$var; - print "
".dol_print_date(dol_mktime(12,0,0,$mois,1,2000),"%B")."
"; $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 = ''; + } + 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 '