diff --git a/.travis.yml b/.travis.yml index 57781d47e44cbc631fcb540ec88765f99e49b706..dc2c543b07e0d95fbda743b1c14e1de0af8efe15 100644 --- a/.travis.yml +++ b/.travis.yml @@ -83,6 +83,8 @@ before_script: - sudo cat /etc/apache2/sites-available/default - sudo /etc/init.d/apache2 restart - wget http://localhost/ + - sudo cat /etc/apache2/envvars + - sudo cat /var/log/apache2/error.log - cat index.html diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 36739254d06efc39e572d82979222892bb0f8a44..0c2a825604b277d136a09b174b5265a17e4ac24f 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -88,7 +88,7 @@ if ($action == 'disable') { } } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_account=""; $search_label=""; @@ -220,4 +220,4 @@ if ($result) { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 21da5bacbb9b3c77226a0dfface62340561cd3d0..b2acc60fb6abc31e4286c6ef8bddc57a080ac3da 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -51,7 +51,7 @@ $offset = $conf->liste_limit * $page; $formventilation = new FormVentilation($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_doc_type=""; $search_doc_ref=""; @@ -231,4 +231,4 @@ else { } llxFooter(); -$db->close(); \ No newline at end of file +$db->close(); diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 887bac4e1e7a586d4eb8e1fd074ecaeccccf4e18..b70e212d2d2bc60bdadb863e4df29635278b02c0 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -59,7 +59,7 @@ $pagenext = $page + 1; if (! $sortorder) { $sortorder=($filter=='outofdate'?"ASC":"DESC"); } if (! $sortfield) { $sortfield=($filter=='outofdate'?"d.datefin":"d.lastname"); } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search=""; $search_ref=""; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 72b7c8fe5499cce67b4b221a623561cd1a528edf..05402898ee6bbe0c16c6e86b6bfdfa4f17607bdf 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -192,7 +192,7 @@ $tabfield[3] = "code,libelle,country_id,country"; $tabfield[4] = "code,label"; $tabfield[5] = "code,label"; $tabfield[6] = "code,libelle,type,color,position"; -$tabfield[7] = "code,libelle,country_id,country,accountancy_code,deductible"; +$tabfield[7] = "code,libelle,country,accountancy_code,deductible"; $tabfield[8] = "code,libelle,country_id,country"; $tabfield[9] = "code,label,unicode"; $tabfield[10]= "country_id,country,taux,recuperableonly,localtax1_type,localtax1,localtax2_type,localtax2,accountancy_code_sell,accountancy_code_buy,note"; diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 640e7e72c57471c941acce7256d8a1707ddfe6b2..05d6a0b48433e027bda524ad46a5a9e7b43f35c4 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -1,6 +1,7 @@ <?php /* Copyright (C) 2001-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net> + * Copyright (C) 2014 Marcos GarcĂa <marcosgdf@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -50,6 +51,13 @@ $backtopage=GETPOST('backtopage','alpha'); if ($action == 'add' || $action == 'addproduct' || $action == 'update') { + + if ($action == 'update') { + $invertedaction = 'edit'; + } else { + $invertedaction = 'create'; + } + $error = 0; if (GETPOST("cancel")) @@ -69,12 +77,12 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (! $title) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("BookmarkTitle")), 'errors'); } if (! $url) { $error++; - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("UrlOrLink")), 'errors'); } if (! $error) @@ -95,43 +103,21 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if ($bookmark->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - setEventMessage($langs->trans("WarningBookmarkAlreadyExists"), 'warnings'); + setEventMessage($langs->transnoentities("WarningBookmarkAlreadyExists"), 'warnings'); } else { setEventMessage($bookmark->error, 'errors'); } - $action='create'; + $action = $invertedaction; } } else { - $action='create'; - } -} - -if ($action == 'delete') -{ - $bookmark=new Bookmark($db); - $bookmark->id=$_GET["bid"]; - $bookmark->url=$user->id; - $bookmark->target=$user->id; - $bookmark->title='xxx'; - $bookmark->favicon='xxx'; - - $res=$bookmark->remove(); - if ($res > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } - else - { - setEventMessage($bookmark->error, 'errors'); + $action = $invertedaction; } } - /* * View */ @@ -153,8 +139,6 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewBookmark")); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); - print '<table class="border" width="100%">'; print '<tr><td width="25%" class="fieldrequired">'.$langs->trans("BookmarkTitle").'</td><td><input class="flat" name="title" size="30" value="'.$title.'"></td><td class="hideonsmartphone">'.$langs->trans("SetHereATitleForLink").'</td></tr>'; @@ -183,8 +167,6 @@ if ($action == 'create') print '</div>'; print '</form>'; - - dol_fiche_end(); } @@ -196,8 +178,15 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) $bookmark=new Bookmark($db); $bookmark->fetch($id); + $head = array( + array( + '', + $langs->trans('Card'), + 'card' + ) + ); - dol_fiche_head($head, $hselected, $langs->trans("Bookmark"),0,'bookmark'); + dol_fiche_head($head, 'card', $langs->trans("Bookmark"),0,'bookmark'); if ($action == 'edit') { @@ -213,12 +202,31 @@ if ($id > 0 && ! preg_match('/^add/i',$action)) print '<tr><td width="25%">'.$langs->trans("Ref").'</td><td>'.$bookmark->ref.'</td></tr>'; - print '<tr><td>'.$langs->trans("BookmarkTitle").'</td><td>'; + print '<tr><td>'; + if ($action == 'edit') { + print '<span class="fieldrequired">'; + } + + print $langs->trans("BookmarkTitle"); + + if ($action == 'edit') { + print '</span>'; + } + + print '</td><td>'; if ($action == 'edit') print '<input class="flat" name="title" size="30" value="'.(isset($_POST["title"])?$_POST["title"]:$bookmark->title).'">'; else print $bookmark->title; print '</td></tr>'; - print '<tr><td>'.$langs->trans("UrlOrLink").'</td><td>'; + print '<tr><td>'; + if ($action == 'edit') { + print '<span class="fieldrequired">'; + } + print $langs->trans("UrlOrLink"); + if ($action == 'edit') { + print '</span>'; + } + print '</td><td>'; if ($action == 'edit') print '<input class="flat" name="url" size="80" value="'.(isset($_POST["url"])?$_POST["url"]:$bookmark->url).'">'; else print '<a href="'.(preg_match('/^http/i',$bookmark->url)?$bookmark->url:DOL_URL_ROOT.$bookmark->url).'"'.($bookmark->target?' target="_blank"':'').'>'.$bookmark->url.'</a>'; print '</td></tr>'; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 61dc0a91d7e4b6adfb1f15792716ce63faaebda1..748a4d9b7fa4d7e9c757e0b07c2189d7cafe4202 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -25,6 +25,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; $langs->load("bookmarks"); +$langs->load("admin"); // Security check if (! $user->rights->bookmark->lire) { @@ -58,7 +59,7 @@ if ($_GET["action"] == 'delete') } else { - $setEventMessage($bookmark->error, 'errors'); + setEventMessage($bookmark->error, 'errors'); } } diff --git a/htdocs/comm/action/listactions.php b/htdocs/comm/action/listactions.php index 53243d0c165cdca47ac97db54d78b07737170818..245902013a189bbce8196024e062f2e434572990 100644 --- a/htdocs/comm/action/listactions.php +++ b/htdocs/comm/action/listactions.php @@ -100,7 +100,7 @@ if (! $user->rights->agenda->allactions->read || $filter=='mine') // If no permi } // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $datestart=''; $dateend=''; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 4129b561ed1abfd82afac9d520c4d18f754fabd2..fd25287c0290916d71508fdd256e3f106618ec0f 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -90,15 +90,15 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) if (! empty($conf->commande->enabled) && $user->rights->commande->lire) { $var=false; - print '<table class="noborder nohover" width="100%">'; print '<form method="post" action="'.DOL_URL_ROOT.'/commande/list.php">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; + print '<table class="noborder nohover" width="100%">'; print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("SearchACustomerOrder").'</td></tr>'; print '<tr '.$bc[$var].'><td>'; print '<label for="sref">'.$langs->trans("Ref").'</label>:</td><td><input type="text" class="flat" name="sref" id="sref" size=18></td><td rowspan="2"><input type="submit" value="'.$langs->trans("Search").'" class="button"></td></tr>'; print '<tr '.$bc[$var].'><td class="nowrap"><label for="sall">'.$langs->trans("Other").'</label>:</td><td><input type="text" class="flat" name="sall" id="sall" size="18"></td>'; print '</tr>'; - print "</form></table><br>\n"; + print "</table></form><br>\n"; } // Search contract diff --git a/htdocs/comm/list.php b/htdocs/comm/list.php index ce7eb82f9a1341f39157b7605194044268660097..b35e4fab7cc8f087408c10c8f40fa2a5b9c7850e 100644 --- a/htdocs/comm/list.php +++ b/htdocs/comm/list.php @@ -75,7 +75,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters); // Note that $a if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_sale=""; $search_categ=""; diff --git a/htdocs/comm/prospect/list.php b/htdocs/comm/prospect/list.php index 113618ffae893fae54a44b04fedbc0a149926f46..3501d94aafdcb2daf7c50b90ac6723b53d0eb14c 100644 --- a/htdocs/comm/prospect/list.php +++ b/htdocs/comm/prospect/list.php @@ -154,7 +154,7 @@ $sts = array(-1,0,1,2,3); $hookmanager->initHooks(array('prospectlist')); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $stcomm=""; diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index b152a38db02de2c3305dfd35cdd5a834d572f12b..2c30f4128c690f5d7fce18face66c923e0ded91b 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -70,7 +70,7 @@ $limit = $conf->liste_limit; $viewstatut=GETPOST('viewstatut'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 5d3d2a051d625b7c98ccb2af487e4be277fb65b7..b18527854666116a6ba6bf49ffcac9c923072c6d 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -346,8 +346,11 @@ if ($action == 'create') } // Accountancy journal - print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>'; - print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.$account->accountancy_journal.'"></td></tr>'; + if (! empty($conf->accounting->enabled)) + { + print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>'; + print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.$account->accountancy_journal.'"></td></tr>'; + } print '</table>'; @@ -470,8 +473,11 @@ else print '<td colspan="3">'.$account->account_number.'</td></tr>'; // Accountancy journal - print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>'; - print '<td colspan="3">'.$account->accountancy_journal.'</td></tr>'; + if (! empty($conf->accounting->enabled)) + { + print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>'; + print '<td colspan="3">'.$account->accountancy_journal.'</td></tr>'; + } print '</table>'; @@ -633,8 +639,11 @@ else } // Accountancy journal - print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>'; - print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>'; + if (! empty($conf->accounting->enabled)) + { + print '<tr><td valign="top">'.$langs->trans("AccountancyJournal").'</td>'; + print '<td colspan="3"><input type="text" name="accountancy_journal" value="'.(isset($_POST["accountancy_journal"])?$_POST["accountancy_journal"]:$account->accountancy_journal).'"></td></tr>'; + } print '</table>'; diff --git a/htdocs/compta/bank/search.php b/htdocs/compta/bank/search.php index 1e8196481e6ddc1b4e0a11e26c19b4335c09d322..127e428162c258e5d458e4a1e9f343a497c1ec1f 100644 --- a/htdocs/compta/bank/search.php +++ b/htdocs/compta/bank/search.php @@ -73,7 +73,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder='DESC'; if (! $sortfield) $sortfield='b.dateo'; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $description=""; $type=""; diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 42a6713c1ce56d58e739931c563e57e64e32ab48..e34e7c2b3a61a1b7796c96db0a871409c4faa71f 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -57,7 +57,7 @@ $limit = $conf->liste_limit; $year=GETPOST("year"); $month=GETPOST("month"); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_name=""; diff --git a/htdocs/compta/dons/list.php b/htdocs/compta/dons/list.php index 174b5357bb218717dcee7a3134a615e507d8c64e..95011ca0b7403f5034ff66fd1eddebf7e28eea03 100644 --- a/htdocs/compta/dons/list.php +++ b/htdocs/compta/dons/list.php @@ -50,7 +50,7 @@ $search_amount = GETPOST('search_amount','alpha'); if (!$user->rights->don->lire) accessforbidden(); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; diff --git a/htdocs/compta/facture/impayees.php b/htdocs/compta/facture/impayees.php index c762aac570273a21669c19771cc032ade17917a8..a010e7d74011ad39929659a115881cc95cceedef 100644 --- a/htdocs/compta/facture/impayees.php +++ b/htdocs/compta/facture/impayees.php @@ -374,7 +374,7 @@ $search_montant_ttc = GETPOST("search_montant_ttc"); $late = GETPOST("late"); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refcustomer=''; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index ba27f5659a9b390a4913623ef9d7f2bf3e7a7a5f..56bd57c725ac4548c7593eb12d38115a0537187b 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -111,7 +111,7 @@ $reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_user=''; diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index 47a6ee8ba74c6b6d5fb025dda11440d450a684a7..fdfe86ec178813eb347bfebb93c3f37f47254ba9 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -61,7 +61,7 @@ $checkdepositstatic=new RemiseCheque($db); $accountstatic=new Account($db); // If click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_amount=''; diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 65615b9bbf36c7338724c369aebd067bbeef9d84..c7fd426babf4dcc0ee4fb9c9e3e92b94bf468039 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -58,7 +58,7 @@ $limit = $conf->liste_limit; if (! $sortorder) $sortorder="DESC"; if (! $sortfield) $sortfield="p.rowid"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 0a68aa686aec4fb303e5a4cbdcca8e0ffa1410a7..921736faedfeb1c4077783f7155bed93152d7af0 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -53,7 +53,7 @@ $ligne=new LignePrelevement($db,$user); $offset = $conf->liste_limit * $page ; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_line=""; $search_bon=""; diff --git a/htdocs/compta/salaries/index.php b/htdocs/compta/salaries/index.php index 17c3efdbfaa0dc1080ede50fe6b3e2fe1dbb245f..678b3bfaa2e754f0be9f85bb38c66f7261fe1b2b 100644 --- a/htdocs/compta/salaries/index.php +++ b/htdocs/compta/salaries/index.php @@ -64,7 +64,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; diff --git a/htdocs/compta/sociales/index.php b/htdocs/compta/sociales/index.php index db4bef2abe6ec76c8836cbc5100c4bfb445d383f..31e98370003fd057905daaf096274339f94ae751 100644 --- a/htdocs/compta/sociales/index.php +++ b/htdocs/compta/sociales/index.php @@ -68,7 +68,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index ebba3888004e71e0c6a4709b164b582422444f9a..45a6907649251717a899605b7ae55a2f3f8c8a0a 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -66,7 +66,7 @@ else $typeid=$_REQUEST['typeid']; } -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_label=""; diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index b1b281923952a1644ac7ffddb6be17371e6db119..debe18e995eb95cd359ce5a2b44e63d3ae390bc9 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -58,7 +58,7 @@ $result = restrictedArea($user, 'contrat', $id); $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; diff --git a/htdocs/contrat/services.php b/htdocs/contrat/services.php index b0fb4ed5edb14da311dffffc85086f0f93d43187..22ae64ef9cd56dc552fe56aad252aab82086653d 100644 --- a/htdocs/contrat/services.php +++ b/htdocs/contrat/services.php @@ -69,7 +69,7 @@ $staticcontrat=new Contrat($db); $staticcontratligne=new ContratLigne($db); $companystatic=new Societe($db); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_name=""; $search_contract=""; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index db8f216fd6069d0239a591cf419c5bf08f8a4e86..781de5f2913f8cc94637289dd784bfdfa36ac01e 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1053,16 +1053,16 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu //if (empty($leftmenu) || $leftmenu=="cat") $newmenu->add("/categories/list.php", $langs->trans("List"), 1, $user->rights->categorie->lire); } - // Stocks + // Warehouse if (! empty($conf->stock->enabled)) { $langs->load("stocks"); - $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Stocks"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); - if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); - if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); - if ($conf->fournisseur->enabled) if (empty($leftmenu) || $leftmenu=="stock") $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); + $newmenu->add("/product/stock/index.php?leftmenu=stock", $langs->trans("Warehouses"), 0, $user->rights->stock->lire, '', $mainmenu, 'stock'); + $newmenu->add("/product/stock/card.php?action=create", $langs->trans("MenuNewWarehouse"), 1, $user->rights->stock->creer); + $newmenu->add("/product/stock/list.php", $langs->trans("List"), 1, $user->rights->stock->lire); + $newmenu->add("/product/stock/mouvement.php", $langs->trans("Movements"), 1, $user->rights->stock->mouvement->lire); + if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/replenish.php", $langs->trans("Replenishment"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); + if ($conf->fournisseur->enabled) $newmenu->add("/product/stock/massstockmove.php", $langs->trans("StockTransfer"), 1, $user->rights->stock->mouvement->lire && $user->rights->fournisseur->lire); } // Expeditions @@ -1233,7 +1233,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=uptodate",$langs->trans("MenuMembersUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=1&filter=outofdate",$langs->trans("MenuMembersNotUpToDate"),2,$user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=0",$langs->trans("MenuMembersResiliated"),2,$user->rights->adherent->lire); - $newmenu->add("/adherents/stats/geo.php?leftmenu=members&mode=memberbycountry",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); + $newmenu->add("/adherents/stats/index.php?leftmenu=members",$langs->trans("MenuMembersStats"),1,$user->rights->adherent->lire); $newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Subscriptions"),0,$user->rights->adherent->cotisation->lire); $newmenu->add("/adherents/list.php?leftmenu=members&statut=-1,1&mainmenu=members",$langs->trans("NewSubscription"),1,$user->rights->adherent->cotisation->creer); diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index 79e5ae5b1a45ec14993cfcc966ac080ab2ca8f69..3c2844f3fe4c64bdf11500c3ea4aaea91ba71ac5 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -64,7 +64,7 @@ $pageprev = $page - 1; $pagenext = $page + 1; // Do we click on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_label=''; $status=-1; diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index af1d244e0d09e911e2fc8ce10d10ec1886d6aad5..0722dedddf4878d48647d2d578bc869fc2e64c67 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -52,7 +52,7 @@ if (! $sortorder) $sortorder="DESC"; $limit = $conf->liste_limit; // Purge search criteria -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref_exp=''; $search_ref_liv=''; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index a6d3f9720ece9dde605b27b621ad5e322f16f50e..9030cd9c4ac791472715828940066d52658fe31b 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -62,7 +62,7 @@ $search_desc=GETPOST('search_desc','alpha'); $search_status=GETPOST('search_status'); $sall=GETPOST('sall'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_company=""; diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index ab0fd08d3f0b3c7f53a4db8193b0a6e568ea127a..6affbae304569a93b22d42010263953724231204 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -58,7 +58,7 @@ if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'fournisseur', $orderid, '', 'commande'); // Purge search criteria -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=''; $search_refsupp=''; diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index d47433af4f534ecfad0d95f7ae5d06bd45eadac9..c7219c6e4153a737683cd80931e68d0462011d90 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -168,30 +168,6 @@ if ($object->id > 0) print $form->editfieldval("Label",'label',$object->label,$object,0); print '</td>'; - // Status - $alreadypaid=$object->getSommePaiement(); - print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$object->getLibStatut(4,$alreadypaid).'</td></tr>'; - - // Amount - print '<tr><td>'.$langs->trans('AmountHT').'</td><td colspan="3">'.price($object->total_ht,1,$langs,0,-1,-1,$conf->currency).'</td></tr>'; - print '<tr><td>'.$langs->trans('AmountVAT').'</td><td colspan="3">'.price($object->total_tva,1,$langs,0,-1,-1,$conf->currency).'</td></tr>'; - - // Amount Local Taxes - //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj=="1") //Localtax1 - { - print '<tr><td>'.$langs->transcountry("AmountLT1",$societe->country_code).'</td>'; - print '<td align="right">'.price($object->total_localtax1,1,$langs,0,-1,-1,$conf->currency).'</td>'; - print '<td colspan="2"> </td></tr>'; - } - if ($societe->localtax2_assuj=="1") //Localtax2 - { - print '<tr><td>'.$langs->transcountry("AmountLT2",$societe->country_code).'</td>'; - print '<td align="right" colspan="3">'.price($object->total_localtax2,1,$langs,0,-1,-1,$conf->currency).'</td>'; - print '</tr>'; - } - print '<tr><td>'.$langs->trans('AmountTTC').'</td><td colspan="3">'.price($object->total_ttc,1,$langs,0,-1,-1,$conf->currency).'</td></tr>'; - print '</table><br>'; print '<table class="border" width="100%">'; diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 2767c792f9ef0f0175cbdf090e56f52b0715396e..83d4b830c5f43f371255a1336d47b52b998d9b68 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -64,7 +64,7 @@ $pagenext = $page + 1; if (! $sortfield) $sortfield="f.date_lim_reglement"; if (! $sortorder) $sortorder="ASC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_ref_supplier=""; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 57100bd98f0b0eaa43ffd11168f7098308c229eb..65428cd138ee7df98f6701cb1db49680f87c6284 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -459,7 +459,7 @@ if (empty($action)) $search_amount=GETPOST('search_amount'); $search_company=GETPOST('search_company'); - if (GETPOST("button_removefilter")) + if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $search_account=""; diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php index 296415c1aee5acc621ed9a35f48686fb878b90ac..b0d7caf8695a00bf68484401fecbe9c7f0595bdd 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -60,7 +60,7 @@ if (! $sortfield) $sortfield="nom"; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array('supplierlist')); -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $socname=""; $search_name=""; diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index a7ab0d0576fed3f7c1ca7ed1c7919bf12524b1f6..afaf4c8e79603155934905b04c9c7fb38446416b 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -118,6 +118,13 @@ if ($fourn_id > 0) { $sql .= " AND ppf.fk_soc = ".$fourn_id; } +// Count total nb of records without orderby and limit +$nbtotalofrecords = 0; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); +} $sql .= " ORDER BY ".$sortfield." ".$sortorder; $sql .= $db->plimit($limit + 1, $offset); @@ -143,7 +150,7 @@ if ($resql) $param="&tobuy=".$tobuy."&sref=".$sref."&snom=".$snom."&fourn_id=".$fourn_id.(isset($type)?"&type=".$type:"").(empty($sRefSupplier)?"":"&srefsupplier=".$sRefSupplier); - print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num); + print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords); if (isset($catid)) diff --git a/htdocs/holiday/index.php b/htdocs/holiday/index.php index e988e6407111d667632e24bac8e12effb286d2be..86c4eca49eb27c5aa570502d9b3e13f289dff7c9 100644 --- a/htdocs/holiday/index.php +++ b/htdocs/holiday/index.php @@ -64,7 +64,7 @@ $search_employe = GETPOST('search_employe'); $search_valideur = GETPOST('search_valideur'); $search_statut = GETPOST('select_statut'); -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_ref=""; $month_create=""; diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 7a08148c9ce557eada9985d2f71af090a56a9155..b03d26dbe1db71e08a0d090b96750870900c4c0e 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -23,7 +23,7 @@ ErrorWarehouseLabelRequired=Warehouse label is required CorrectStock=Correct stock ListOfWarehouses=List of warehouses ListOfStockMovements=List of stock movements -StocksArea=Stocks area +StocksArea=Warehouses area Location=Location LocationSummary=Short name location NumberOfDifferentProducts=Number of different products diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index 3dd0fcd0b49d3ed982b988237cdb01726a27f143..5b56ac4568b04bb9d736f00c2334b22192cca05d 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -109,8 +109,8 @@ $sql = "SELECT"; if ($agentid > 0) $sql.= " s.rowid as socid, s.nom as name, s.code_client, s.client,"; $sql.= " u.rowid as agent, u.login, u.lastname, u.firstname,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge" ; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact e ON e.element_id = f.rowid and e.statut = 4 and e.fk_c_type_contact = ".(empty($conf->global->AGENT_CONTACT_TYPE)?-1:$conf->global->AGENT_CONTACT_TYPE); diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index fbc947a7cc9d093bdc2fc0af7ccc0a45e4ef2636..245b29dfd24732703ae3c40c7f1051a269c6274b 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -164,8 +164,8 @@ $sql = "SELECT"; $sql.= " s.rowid as socid, s.nom as name, s.code_client, s.client,"; if ($client) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; $sql.= ", ".MAIN_DB_PREFIX."facturedet as d"; diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index a8830f777ecfe3f542ece906ea524629a75c0bb0..b359287d24fd0261340e72f91de00846193a72c2 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -166,8 +166,8 @@ $sql = "SELECT p.label, p.rowid, p.fk_product_type, p.ref,"; if ($id > 0) $sql.= " d.fk_product,"; if ($id > 0) $sql.= " f.rowid as facid, f.facnumber, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql.= " sum(d.total_ht) as selling_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; -$sql.= " sum(".$db->ifsql('d.total_ht <=0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','d.qty * d.buy_price_ht * -1','d.qty * d.buy_price_ht').") as buying_price,"; +$sql.= " sum(".$db->ifsql('d.total_ht < 0','-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty))','d.total_ht - (d.buy_price_ht * d.qty)').") as marge"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."product as p"; $sql.= ", ".MAIN_DB_PREFIX."facture as f"; diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index a4aae519b98b49a66ed0e4531abd57f7d4536424..84dacf8db43e7d07b1241da21dcfbb52726ed648 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -298,10 +298,9 @@ else */ print '</table>'; - print '</div>'; // Boutons actions - print '<div class="tabsAction">'; + print '<div class="center">'; print '<input type="submit" id="convert_vatrate" name="convert_vatrate" value="'.$langs->trans("MassConvert").'" class="button" />'; print '</div>'; diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 1bc30b2df5f485d38cc16509bd717f9313bd85ea..e2898943509e9d4aac44857be0b4e30ed7b1c4a2 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -3249,11 +3249,11 @@ class Product extends CommonObject $alt.=' - '.$langs->transnoentitiesnoconv('Size').': '.$imgarray['width'].'x'.$imgarray['height']; if ($photo_vignette && $imgarray['height'] > $maxHeight) { $return.= '<!-- Show thumb -->'; - $return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">'; + $return.= '<img class="photo photowithmargin" border="0" '.($conf->dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdirthumb.$photo_vignette).'" title="'.dol_escape_htmltag($alt).'">'; } else { $return.= '<!-- Show original file -->'; - $return.= '<img class="photo photowithmargin" border="0" height="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">'; + $return.= '<img class="photo photowithmargin" border="0" '.($conf->dol_use_jmobile?'max-height':'height').'="'.$maxHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=product&entity='.$this->entity.'&file='.urlencode($pdir.$photo).'" title="'.dol_escape_htmltag($alt).'">'; } $return.= '</a>'."\n"; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index f242121625fe9b16fce84ce36bfb852e34ad3032..907181634ee623303be09ef61e73e8c9e4e554f9 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -129,6 +129,8 @@ else { $texte = $langs->trans("ProductsAndServices"); } + // Add what we are searching for + if (! empty($sall)) $texte.= " - ".$sall; $sql = 'SELECT DISTINCT p.rowid, p.ref, p.label, p.barcode, p.price, p.price_ttc, p.price_base_type,'; $sql.= ' p.fk_product_type, p.tms as datem,'; diff --git a/htdocs/product/stock/index.php b/htdocs/product/stock/index.php index d2078d473e73c4172c676ff64c22234e007970c2..dc394f898dcb2d1a2af558b0e95b7d93543b19c2 100644 --- a/htdocs/product/stock/index.php +++ b/htdocs/product/stock/index.php @@ -15,7 +15,6 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. - * */ /** diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 06e089c52098e8db031847718fe57c3ab3fad89d..83d856ed0cc9271d87a2a768753c96120949f953 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -60,7 +60,7 @@ $offset = $conf->liste_limit * $page; if (! $sortfield) $sortfield="m.datem"; if (! $sortorder) $sortorder="DESC"; -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $year=''; $month=''; diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 22dc080d6e24bb4754e566533bc81e3782c76b1d..96ecdb1d95df8ebdb5a76aa3d4d83ae314a5b33a 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -334,15 +334,16 @@ if ($id > 0 || $ref) // Calculating a theorical value print '<tr><td>'.$langs->trans("VirtualStock").'</td>'; - print "<td>".$product->stock_theorique; + print "<td>".(empty($product->stock_theorique)?0:$product->stock_theorique); if ($product->stock_theorique < $product->seuil_stock_alerte) { print ' '.img_warning($langs->trans("StockLowerThanLimit")); } print '</td>'; print '</tr>'; - + print '<tr><td>'; - $text_stock_options = (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'<br>':''); + $text_stock_options = ''; + $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SHIPMENT)?$langs->trans("DeStockOnShipment").'<br>':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_VALIDATE_ORDER)?$langs->trans("DeStockOnValidateOrder").'<br>':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_BILL)?$langs->trans("DeStockOnBill").'<br>':''); $text_stock_options.= (! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)?$langs->trans("ReStockOnBill").'<br>':''); @@ -353,7 +354,6 @@ if ($id > 0 || $ref) print '<td>'; $found=0; - // Number of customer orders running if (! empty($conf->commande->enabled)) { diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index b4260e8ea91a57c015edb19023fbb25daea6ab70..614f91468cc885fbbda332641d632b600e1fb3ff 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -63,6 +63,14 @@ $search_label=GETPOST("search_label"); $search_societe=GETPOST("search_societe"); $search_all=GETPOST("search_all"); +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_ref=""; + $search_label=""; + $search_societe=""; + $search_all=0; +} /* * View @@ -147,8 +155,10 @@ if ($resql) print '<input type="text" class="flat" name="search_societe" value="'.$search_societe.'">'; print '</td>'; print '<td class="liste_titre"> </td>'; - print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>'; - print "</tr>\n"; + print '<td class="liste_titre nowrap" align="right">'; + print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; + print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("RemoveFilter"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; + print '</td>'; while ($i < $num) { diff --git a/htdocs/projet/tasks/index.php b/htdocs/projet/tasks/index.php index cdf90a918a31cb3266fe18eef3a787ab6e29e235..4354fc23b2c24485abcb9c1bd3d55bfeabebaf96 100644 --- a/htdocs/projet/tasks/index.php +++ b/htdocs/projet/tasks/index.php @@ -51,7 +51,13 @@ $page = $page == -1 ? 0 : $page; $mine = $_REQUEST['mode']=='mine' ? 1 : 0; - +// Purge criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers +{ + $search_project=""; + $search_status=""; +} +if (empty($search_status)) $search_status=1; /* * View @@ -122,9 +128,10 @@ print $form->selectarray('search_status', $listofstatus, $search_status); print '</td>'; print '<td class="liste_titre" colspan="7">'; print ' '; +print '<td class="liste_titre nowrap" align="right">'; +print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">'; +print '<input type="image" class="liste_titre" name="button_removefilter" src="'.img_picto($langs->trans("RemoveFilter"),'searchclear.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">'; print '</td>'; -print '<td class="liste_titre" align="right"><input class="liste_titre" type="image" name="button_search" src="'.img_picto($langs->trans("Search"),'search.png','','',1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>'; -print "</tr>\n"; if (count($tasksarray) > (empty($conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)?1000:$conf->global->PROJECT_LIMIT_TASK_PROJECT_AREA)) { diff --git a/htdocs/public/test/test_forms.php b/htdocs/public/test/test_forms.php index cb551e6076192aaa64830fe44d6b26df9f220262..c600e9b0acdbb116f2a9ef0fdde530fc8227bc06 100644 --- a/htdocs/public/test/test_forms.php +++ b/htdocs/public/test/test_forms.php @@ -18,7 +18,7 @@ llxHeader(); ?> <h1> -This page is a sample of page using html methods. It is designed to make test with<br> +This page is a sample of page using Dolibarr HTML widget methods. It is designed to make test with<br> - css (edit page to change to test another css)<br> - jmobile (add parameter dol_use_jmobile=1 to enable view with jmobile)<br> <br> diff --git a/htdocs/societe/consumption.php b/htdocs/societe/consumption.php index f89212e5fbc92cb8de6f89f6cdf5d7bb7e4cdafa..d5ef1af6dbbecd824278a55bbd1beef7cf49755d 100644 --- a/htdocs/societe/consumption.php +++ b/htdocs/societe/consumption.php @@ -58,7 +58,7 @@ $month = GETPOST('month','int'); $year = GETPOST('year','int'); // Clean up on purge search criteria ? -if (GETPOST("button_removefilter")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $sref=''; $sprod_fulldescr=''; diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index f0b3532018b455ace9bb7feafd323ae01f978e32..2d046a3ec169efa3f988f79a98893b4a05d42ce0 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -153,7 +153,7 @@ llxHeader('',$langs->trans("ThirdParty"),$help_url); // Do we click on purge search criteria ? -if (GETPOST("button_removefilter_x")) +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers { $search_categ=''; $search_sale=''; diff --git a/htdocs/user/group/index.php b/htdocs/user/group/index.php index 00af5b0e6d24744569aa7dd4eb9dda91e5c88d6a..1f06fa3a3c2401798c77e5efbcb14c439b38c266 100644 --- a/htdocs/user/group/index.php +++ b/htdocs/user/group/index.php @@ -91,7 +91,7 @@ if ($resql) { print_liste_field_titre($langs->trans("Entity"),$_SERVER["PHP_SELF"],"g.entity",$param,"",'align="center"',$sortfield,$sortorder); } - print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"g.nb",$param,"",'align="center"',$sortfield,$sortorder); + print_liste_field_titre($langs->trans("NbOfUsers"),$_SERVER["PHP_SELF"],"nb",$param,"",'align="center"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DateCreation"),$_SERVER["PHP_SELF"],"g.datec",$param,"",'align="right"',$sortfield,$sortorder); print "</tr>\n"; $var=True; diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index f42c270fa42378f7fd1363e7c3ec814263162bcf..4d19dbe2d1065d02e58ede5d631740ed95cf1f08 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -655,6 +655,7 @@ function updateContact($authentication,$contact) $object->province_id=$contact['province_id']; + $object->phone_pro=$contact['phone_pro']; $object->phone_perso=$contact['phone_perso']; $object->phone_mobile=$contact['phone_mobile']; $object->fax=$contact['fax'];