Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
1ecd6db5
Commit
1ecd6db5
authored
19 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
Modif permissions
parent
01875b72
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/telephonie/tarifs/index.php
+12
-8
12 additions, 8 deletions
htdocs/telephonie/tarifs/index.php
htdocs/telephonie/tarifs/pre.inc.php
+9
-3
9 additions, 3 deletions
htdocs/telephonie/tarifs/pre.inc.php
htdocs/telephonie/tarifs/tarif.php
+10
-31
10 additions, 31 deletions
htdocs/telephonie/tarifs/tarif.php
with
31 additions
and
42 deletions
htdocs/telephonie/tarifs/index.php
+
12
−
8
View file @
1ecd6db5
...
@@ -75,6 +75,7 @@ $sql .= " , t.libelle as tarif, t.rowid as tarif_id";
...
@@ -75,6 +75,7 @@ $sql .= " , t.libelle as tarif, t.rowid as tarif_id";
$sql
.
=
" , m.temporel, m.fixe"
;
$sql
.
=
" , m.temporel, m.fixe"
;
$sql
.
=
" , u.code"
;
$sql
.
=
" , u.code"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille as d"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille as d"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille_rights as r"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_montant as m"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_montant as m"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif as t"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif as t"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"user as u"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"user as u"
;
...
@@ -83,6 +84,10 @@ $sqlc .= " WHERE d.rowid = m.fk_tarif_desc";
...
@@ -83,6 +84,10 @@ $sqlc .= " WHERE d.rowid = m.fk_tarif_desc";
$sqlc
.
=
" AND m.fk_tarif = t.rowid"
;
$sqlc
.
=
" AND m.fk_tarif = t.rowid"
;
$sqlc
.
=
" AND m.fk_user = u.rowid"
;
$sqlc
.
=
" AND m.fk_user = u.rowid"
;
$sqlc
.
=
" AND d.rowid = r.fk_grille"
;
$sqlc
.
=
" AND r.fk_user ="
.
$user
->
id
;
$sqlc
.
=
" AND r.pread = 1"
;
if
(
$_GET
[
"search_libelle"
])
if
(
$_GET
[
"search_libelle"
])
{
{
$sqlc
.
=
" AND t.libelle LIKE '%"
.
$_GET
[
"search_libelle"
]
.
"%'"
;
$sqlc
.
=
" AND t.libelle LIKE '%"
.
$_GET
[
"search_libelle"
]
.
"%'"
;
...
@@ -98,14 +103,13 @@ if ($_GET["type"])
...
@@ -98,14 +103,13 @@ if ($_GET["type"])
$sqlc
.
=
" AND d.type_tarif = '"
.
$_GET
[
"type"
]
.
"'"
;
$sqlc
.
=
" AND d.type_tarif = '"
.
$_GET
[
"type"
]
.
"'"
;
}
}
$sql
=
$sql
.
$sqlc
.
" ORDER BY
$sortfield
$sortorder
"
.
$db
->
plimit
(
$conf
->
liste_limit
+
1
,
$offset
);
$sql
=
$sql
.
$sqlc
.
" ORDER BY
$sortfield
$sortorder
"
.
$db
->
plimit
(
$conf
->
liste_limit
+
1
,
$offset
);
$res
ult
=
$db
->
query
(
$sql
);
$res
ql
=
$db
->
query
(
$sql
);
if
(
$res
ult
)
if
(
$res
ql
)
{
{
$num
=
$db
->
num_rows
();
$num
=
$db
->
num_rows
(
$resql
);
$i
=
0
;
$i
=
0
;
print_barre_liste
(
"Tarifs"
,
$page
,
"index.php"
,
"&type="
.
$_GET
[
"type"
],
$sortfield
,
$sortorder
,
''
,
$num
);
print_barre_liste
(
"Tarifs"
,
$page
,
"index.php"
,
"&type="
.
$_GET
[
"type"
],
$sortfield
,
$sortorder
,
''
,
$num
);
...
@@ -139,7 +143,7 @@ if ($result)
...
@@ -139,7 +143,7 @@ if ($result)
while
(
$i
<
min
(
$num
,
$conf
->
liste_limit
))
while
(
$i
<
min
(
$num
,
$conf
->
liste_limit
))
{
{
$obj
=
$db
->
fetch_object
(
$
i
);
$obj
=
$db
->
fetch_object
(
$
resql
);
$var
=!
$var
;
$var
=!
$var
;
print
"<tr
$bc[$var]
>"
;
print
"<tr
$bc[$var]
>"
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/telephonie/tarifs/pre.inc.php
+
9
−
3
View file @
1ecd6db5
...
@@ -50,8 +50,10 @@ function llxHeader($head = "", $title="") {
...
@@ -50,8 +50,10 @@ function llxHeader($head = "", $title="") {
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/ligne/index.php"
,
"Lignes"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/ligne/index.php"
,
"Lignes"
);
if
(
$user
->
rights
->
telephonie
->
ligne_commander
)
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/ligne/commande/"
,
"Commandes"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/ligne/commande/"
,
"Commandes"
);
if
(
$user
->
rights
->
telephonie
->
stats
->
lire
)
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/stats/"
,
"Statistiques"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/stats/"
,
"Statistiques"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/facture/"
,
"Factures"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/facture/"
,
"Factures"
);
...
@@ -66,6 +68,10 @@ function llxHeader($head = "", $title="") {
...
@@ -66,6 +68,10 @@ function llxHeader($head = "", $title="") {
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/telephonie/tarifs/prefix.php"
,
"Prefix"
);
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/telephonie/tarifs/prefix.php"
,
"Prefix"
);
if
(
$user
->
rights
->
telephonie
->
tarif
->
permission
)
$menu
->
add_submenu
(
DOL_URL_ROOT
.
"/telephonie/tarifs/permissions.php"
,
"Permissions"
);
if
(
$user
->
rights
->
telephonie
->
fournisseur
->
lire
)
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/fournisseurs.php"
,
"Fournisseurs"
);
$menu
->
add
(
DOL_URL_ROOT
.
"/telephonie/fournisseurs.php"
,
"Fournisseurs"
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/telephonie/tarifs/tarif.php
+
10
−
31
View file @
1ecd6db5
...
@@ -23,37 +23,6 @@ require("./pre.inc.php");
...
@@ -23,37 +23,6 @@ require("./pre.inc.php");
llxHeader
();
llxHeader
();
/*
* Scurit accs client
*/
if
(
$user
->
societe_id
>
0
)
{
$action
=
''
;
$socidp
=
$user
->
societe_id
;
}
/*
* Recherche
*
*
*/
if
(
$mode
==
'search'
)
{
if
(
$mode
-
search
==
'soc'
)
{
$sql
=
"SELECT s.idp FROM "
.
MAIN_DB_PREFIX
.
"societe as s "
;
$sql
.
=
" WHERE lower(s.nom) like '%"
.
strtolower
(
$socname
)
.
"%'"
;
}
if
(
$db
->
query
(
$sql
)
)
{
if
(
$db
->
num_rows
()
==
1
)
{
$obj
=
$db
->
fetch_object
(
0
);
$socid
=
$obj
->
idp
;
}
$db
->
free
();
}
}
/*
/*
* Mode Liste
* Mode Liste
*
*
...
@@ -66,6 +35,7 @@ $sql = "SELECT d.libelle as tarif_desc, d.type_tarif, d.rowid";
...
@@ -66,6 +35,7 @@ $sql = "SELECT d.libelle as tarif_desc, d.type_tarif, d.rowid";
$sql
.
=
" , t.libelle as tarif"
;
$sql
.
=
" , t.libelle as tarif"
;
$sql
.
=
" , m.temporel, m.fixe"
;
$sql
.
=
" , m.temporel, m.fixe"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille as d"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille as d"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille_rights as r"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_montant as m"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_montant as m"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif as t"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif as t"
;
...
@@ -73,6 +43,10 @@ $sql .= " WHERE d.rowid = m.fk_tarif_desc";
...
@@ -73,6 +43,10 @@ $sql .= " WHERE d.rowid = m.fk_tarif_desc";
$sql
.
=
" AND m.fk_tarif = t.rowid"
;
$sql
.
=
" AND m.fk_tarif = t.rowid"
;
$sql
.
=
" AND t.rowid = '"
.
$_GET
[
"id"
]
.
"'"
;
$sql
.
=
" AND t.rowid = '"
.
$_GET
[
"id"
]
.
"'"
;
$sql
.
=
" AND d.type_tarif = 'vente'"
;
$sql
.
=
" AND d.type_tarif = 'vente'"
;
$sql
.
=
" AND d.rowid = r.fk_grille"
;
$sql
.
=
" AND r.fk_user ="
.
$user
->
id
;
$sql
.
=
" AND r.pread = 1"
;
$sql
.
=
" ORDER BY t.libelle asc"
;
$sql
.
=
" ORDER BY t.libelle asc"
;
$resql
=
$db
->
query
(
$sql
);
$resql
=
$db
->
query
(
$sql
);
...
@@ -122,6 +96,7 @@ $sql = "SELECT d.libelle as tarif_desc, d.type_tarif, d.rowid";
...
@@ -122,6 +96,7 @@ $sql = "SELECT d.libelle as tarif_desc, d.type_tarif, d.rowid";
$sql
.
=
" , t.libelle as tarif"
;
$sql
.
=
" , t.libelle as tarif"
;
$sql
.
=
" , m.temporel, m.fixe"
;
$sql
.
=
" , m.temporel, m.fixe"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille as d"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille as d"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_grille_rights as r"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_montant as m"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif_montant as m"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif as t"
;
$sql
.
=
","
.
MAIN_DB_PREFIX
.
"telephonie_tarif as t"
;
...
@@ -130,6 +105,10 @@ $sql .= " AND m.fk_tarif = t.rowid";
...
@@ -130,6 +105,10 @@ $sql .= " AND m.fk_tarif = t.rowid";
$sql
.
=
" AND t.rowid = '"
.
$_GET
[
"id"
]
.
"'"
;
$sql
.
=
" AND t.rowid = '"
.
$_GET
[
"id"
]
.
"'"
;
$sql
.
=
" AND d.type_tarif = 'achat'"
;
$sql
.
=
" AND d.type_tarif = 'achat'"
;
$sql
.
=
" AND d.rowid = r.fk_grille"
;
$sql
.
=
" AND r.fk_user ="
.
$user
->
id
;
$sql
.
=
" AND r.pread = 1"
;
$sql
.
=
" ORDER BY t.libelle ASC"
;
$sql
.
=
" ORDER BY t.libelle ASC"
;
$resql
=
$db
->
query
(
$sql
);
$resql
=
$db
->
query
(
$sql
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment