diff --git a/include/class_admin.php b/include/class_admin.php index 6329c8187..73b29e8c8 100644 --- a/include/class_admin.php +++ b/include/class_admin.php @@ -66,7 +66,7 @@ class Admin extends fiche{ { $p_search=FormatString($p_search); $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['SCRIPT_NAME']; + $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow $all_admin=$this->CountByDef($this->fiche_def_ref,$p_search); @@ -110,9 +110,11 @@ class Admin extends fiche{ " ".$admin->strAttribut(ATTR_DEF_PAYS). ""; $r.="
| Quick Code | Nom | Téléphone | Fax | Société | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id."\">".$contact->strAttribut(ATTR_DEF_NAME)." | "; + $r.='id."\">".$contact->strAttribut(ATTR_DEF_QUICKCODE). + " | "; + $r.="".$contact->strAttribut(ATTR_DEF_NAME)." | "; $r.="".$contact->strAttribut(ATTR_DEF_TEL)." | "; $r.="".$contact->strAttribut(ATTR_DEF_EMAIL)." | ". "".$contact->strAttribut(ATTR_DEF_FAX)." | ". diff --git a/include/class_customer.php b/include/class_customer.php index 6134c0e4f..28a260a95 100644 --- a/include/class_customer.php +++ b/include/class_customer.php @@ -196,7 +196,7 @@ where { $p_search=FormatString($p_search); $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['SCRIPT_NAME']; + $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow $all_client=$this->CountByDef($this->fiche_def_ref,$p_search); @@ -225,7 +225,7 @@ whereNom | Adresse | Solde | -Action | +Action | Facture | '; + $r.=sprintf('Financier | ', + $script,$client->strAttribut(ATTR_DEF_QUICKCODE) ,$url); $r.=''; diff --git a/include/class_supplier.php b/include/class_supplier.php index 93f4a421f..e1b94a036 100644 --- a/include/class_supplier.php +++ b/include/class_supplier.php @@ -84,7 +84,7 @@ class Supplier extends fiche{ { $p_search=FormatString($p_search); $url=urlencode($_SERVER['REQUEST_URI']); - $script=$_SERVER['SCRIPT_NAME']; + $script=$_SERVER['PHP_SELF']; // Creation of the nav bar // Get the max numberRow $all_supplier=$this->CountByDef($this->fiche_def_ref,$p_search); @@ -113,7 +113,7 @@ class Supplier extends fiche{Nom | Adresse | Solde | -Action | +Action | '; if ( sizeof ($step_supplier ) == 0 ) return $r; @@ -148,6 +148,9 @@ class Supplier extends fiche{ $r.='Facture | '; + $r.=sprintf('Financier | ', + $script,$supplier->strAttribut(ATTR_DEF_QUICKCODE) ,$url); + $r.=''; diff --git a/include/user_common.php b/include/user_common.php index bf302d75f..40c6ddb1b 100644 --- a/include/user_common.php +++ b/include/user_common.php @@ -897,7 +897,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1) $step=$_SESSION['g_pagesize']; $offset=($e-1)*$step; - $r=''; + $r=''; $r.="Précédent"; $r.=" "; } @@ -916,7 +916,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1) if ( $e != $p_page ) { $step=$_SESSION['g_pagesize']; $offset=($e-1)*$step; - $go=sprintf($_SERVER['SCRIPT_NAME']."?".$url."&offset=$offset&step=$step&page=$e&size=$step"); + $go=sprintf($_SERVER['PHP_SELF']."?".$url."&offset=$offset&step=$step&page=$e&size=$step"); $r.=sprintf('%d ',$go,$e); } else { $r.=" $e "; @@ -930,7 +930,7 @@ function jrn_navigation_bar($p_offset,$p_line,$p_size=0,$p_page=1) $step=$_SESSION['g_pagesize']; $offset=($e-1)*$step; - $r.=' '; + $r.=' '; $r.="Suivant"; $r.=""; } diff --git a/include/user_form_ach.php b/include/user_form_ach.php index 51abd2100..2e09d6c30 100644 --- a/include/user_form_ach.php +++ b/include/user_form_ach.php @@ -62,8 +62,8 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri $r.=JS_SHOW_TVA; $r.=JS_TVA; // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php @@ -74,7 +74,7 @@ echo_debug('user_form_ach.php',__LINE__,"Enter FormAchInput($p_cn,$p_jrn,$p_peri $href="commercial.php?p_action=depense&p_jrn=$p_jrn"; break; default: - echo_error('user_form_ach.php',__LINE__,'Erreur invalid request uri'); + echo_error('user_form_ach.php',__LINE__,'Erreur invalid request uri '.$href); exit (-1); } @@ -574,8 +574,8 @@ function FormAchView ($p_cn,$p_jrn,$p_periode,$p_array,$p_submit,$p_number,$p_pi $r.=""; // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php diff --git a/include/user_form_fin.php b/include/user_form_fin.php index a45321bac..7ca7a33da 100644 --- a/include/user_form_fin.php +++ b/include/user_form_fin.php @@ -154,8 +154,8 @@ function FormFin($p_cn,$p_jrn,$p_periode,$p_submit,$p_array=null,$pview_only=tru $r.=JS_CONCERNED_OP; } // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php module "Comptable" diff --git a/include/user_form_ven.php b/include/user_form_ven.php index 04524fec6..9c0f66f3e 100644 --- a/include/user_form_ven.php +++ b/include/user_form_ven.php @@ -63,8 +63,8 @@ function FormVenInput($p_cn,$p_jrn,$p_periode,$p_array=null,$pview_only=true,$p_ $r.=JS_SHOW_TVA; $r.=JS_TVA; // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php @@ -528,8 +528,8 @@ function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='form' $r.=""; if ( $p_doc == 'form' ) { // Compute href - // $href=basename($_SERVER['SCRIPT_NAME']); - $href=basename($_SERVER['SCRIPT_NAME']); + // $href=basename($_SERVER['PHP_SELF']); + $href=basename($_SERVER['PHP_SELF']); switch ($href) { // user_jrn.php @@ -558,9 +558,9 @@ function FormVenteView ($p_cn,$p_jrn,$p_periode,$p_array,$p_number,$p_doc='form' // if we were in the management module, appl. propose to generate an invoice - // if ( $_SERVER['SCRIPT_NAME'] == '/commercial.php') - echo_debug('user_form_ven',__LINE__," _SERVER['SCRIPT_NAME'] ".$_SERVER['SCRIPT_NAME']); - if ( $_SERVER['SCRIPT_NAME'] == '/commercial.php') + // if ( $_SERVER['PHP_SELF'] == '/commercial.php') + echo_debug('user_form_ven',__LINE__," _SERVER['PHP_SELF'] ".$_SERVER['PHP_SELF']); + if ( $_SERVER['PHP_SELF'] == '/commercial.php') { // if a template exists propose to choose an invoice template if ( CountSql($p_cn, diff --git a/include/user_menu.php b/include/user_menu.php index dc19e831c..3473621d1 100644 --- a/include/user_menu.php +++ b/include/user_menu.php @@ -134,7 +134,7 @@ function ShowMenuCompta($p_dossier,$p_high="") include_once("postgres.php"); // find our current menu - $default=basename($_SERVER['SCRIPT_NAME']); + $default=basename($_SERVER['PHP_SELF']); switch ($default) { case "user_jrn.php": $default.="?show"; @@ -205,7 +205,7 @@ function GetFirstJrnIdForJrnType($p_dossier,$p_type) * \param $p_jrn journal * \param $p_extra html code to add at the return (before the \