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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
d1313970
Commit
d1313970
authored
20 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
Modif de fond des prelevements
parent
262776d4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/compta/prelevement/liste.php
+27
-48
27 additions, 48 deletions
htdocs/compta/prelevement/liste.php
with
27 additions
and
48 deletions
htdocs/compta/prelevement/liste.php
+
27
−
48
View file @
d1313970
...
@@ -32,54 +32,36 @@ if ($user->societe_id > 0)
...
@@ -32,54 +32,36 @@ if ($user->societe_id > 0)
}
}
/*
/*
*
Recherche
*
*
*
*
*
*/
*/
$page
=
$_GET
[
"page"
];
$page
=
$_GET
[
"page"
];
$sortorder
=
$_GET
[
"sortorder"
];
$sortorder
=
(
empty
(
$_GET
[
"sortorder"
]))
?
"DESC"
:
$_GET
[
"sortorder"
];
$sortfield
=
$_GET
[
"sortfield"
];
$sortfield
=
(
empty
(
$_GET
[
"sortfield"
]))
?
"p.datec"
:
$_GET
[
"sortfield"
];
if
(
$sortorder
==
""
)
$sortorder
=
"DESC"
;
if
(
$sortfield
==
""
)
$sortfield
=
"p.datec"
;
$offset
=
$conf
->
liste_limit
*
$page
;
$offset
=
$conf
->
liste_limit
*
$page
;
$pageprev
=
$page
-
1
;
$pagenext
=
$page
+
1
;
/*
$sql
=
"SELECT p.rowid, p.statut, p.ref, pl.amount,"
.
$db
->
pdate
(
"p.datec"
)
.
" as datec"
;
* Mode Liste
$sql
.
=
" , s.nom, s.code_client"
;
*
$sql
.
=
" , pl.rowid as rowid_ligne, pl.statut as statut_ligne"
;
*
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"prelevement_bons as p"
;
*
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"prelevement_lignes as pl"
;
*/
$sql
=
"SELECT p.rowid, p.ref, p.amount,"
.
$db
->
pdate
(
"p.datec"
)
.
" as datec"
;
$sql
.
=
" , f.facnumber, f.total_ttc"
;
$sql
.
=
" , s.nom"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"prelevement as p"
;
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"facture as f"
;
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"prelevement_facture as pf"
;
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"societe as s"
;
$sql
.
=
" , "
.
MAIN_DB_PREFIX
.
"societe as s"
;
$sql
.
=
" WHERE
s.idp = f.fk_soc
"
;
$sql
.
=
" WHERE
pl.fk_prelevement_bons = p.rowid
"
;
$sql
.
=
" AND
pf.fk_facture = f.rowid AND
p
f
.fk_
prelevement = p.rowid
"
;
$sql
.
=
" AND
s.idp =
p
l
.fk_
soc
"
;
if
(
$_GET
[
"search_bon"
])
if
(
$_GET
[
"search_bon"
])
{
{
$sql
.
=
" AND p.ref LIKE '%"
.
$_GET
[
"search_bon"
]
.
"%'"
;
$sql
.
=
" AND p.ref LIKE '%"
.
$_GET
[
"search_bon"
]
.
"%'"
;
}
}
if
(
$_GET
[
"search_societe"
])
if
(
$_GET
[
"search_societe"
])
{
{
$sel
=
urldecode
(
$_GET
[
"search_societe"
]);
$sel
=
urldecode
(
$_GET
[
"search_societe"
]);
$sql
.
=
" AND s.nom LIKE '%"
.
$sel
.
"%'"
;
$sql
.
=
" AND s.nom LIKE '%"
.
$sel
.
"%'"
;
}
}
if
(
$_GET
[
"search_facture"
])
{
$sql
.
=
" AND f.facnumber LIKE '%"
.
$_GET
[
"search_facture"
]
.
"%'"
;
}
$sql
.
=
" ORDER BY
$sortfield
$sortorder
"
.
$db
->
plimit
(
$conf
->
liste_limit
+
1
,
$offset
);
$sql
.
=
" ORDER BY
$sortfield
$sortorder
"
.
$db
->
plimit
(
$conf
->
liste_limit
+
1
,
$offset
);
$result
=
$db
->
query
(
$sql
);
$result
=
$db
->
query
(
$sql
);
...
@@ -91,31 +73,29 @@ if ($result)
...
@@ -91,31 +73,29 @@ if ($result)
$urladd
=
"&statut="
.
$_GET
[
"statut"
];
$urladd
=
"&statut="
.
$_GET
[
"statut"
];
$urladd
.
=
"&search_bon="
.
$_GET
[
"search_bon"
];
$urladd
.
=
"&search_bon="
.
$_GET
[
"search_bon"
];
print_barre_liste
(
"
P
rlvements"
,
$page
,
"liste.php"
,
$urladd
,
$sortfield
,
$sortorder
,
''
,
$num
);
print_barre_liste
(
"
Lignes de p
rlvements"
,
$page
,
"liste.php"
,
$urladd
,
$sortfield
,
$sortorder
,
''
,
$num
);
print
"
\n
<!-- debut table -->
\n
"
;
print
"
\n
<!-- debut table -->
\n
"
;
print
'<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'
;
print
'<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'
;
print
'<tr class="liste_titre">'
;
print
'<tr class="liste_titre">
<td>Ligne</td>
'
;
print_liste_field_titre
(
"Bon"
,
"liste.php"
,
"p.ref"
);
print_liste_field_titre
(
"Bon"
,
"liste.php"
,
"p.ref"
);
print
"<td>Facture</td>"
;
print_liste_field_titre
(
"Socit"
,
"liste.php"
,
"s.nom"
);
print_liste_field_titre
(
"Socit"
,
"liste.php"
,
"s.nom"
);
print_liste_field_titre
(
"Date"
,
"liste.php"
,
"p.datec"
,
""
,
""
,
'align="center"'
);
print_liste_field_titre
(
"Date"
,
"liste.php"
,
"p.datec"
,
""
,
""
,
'align="center"'
);
print
'<td align="right">Montant</td>'
;
print
'<td align="right">Montant</td>'
;
print_liste_field_titre
(
"Code client"
,
"liste.php"
,
"s.code_client"
,
''
,
''
,
'align="center"'
);
print
'</tr><tr class="liste_titre">'
;
print
'</tr><tr class="liste_titre">'
;
print
'<form action="liste.php" method="GET"><td> </td>'
;
print
'<td><input type="text" name="search_bon" value="'
.
$_GET
[
"search_bon"
]
.
'" size="8"></td>'
;
print
'<form action="liste.php" method="GET">'
;
print
'<td><input type="text" name="search_code" value="'
.
$_GET
[
"search_code"
]
.
'" size="8"></td>'
;
print
'<td><input type="text" name="search_bon" value="'
.
$_GET
[
"search_bon"
]
.
'" size="10"></td>'
;
print
'<td><input type="text" name="search_societe" value="'
.
$_GET
[
"search_societe"
]
.
'" size="12"></td>'
;
print
'<td><input type="text" name="search_facture" value="'
.
$_GET
[
"search_facture"
]
.
'" size="10"></td>'
;
print
'<td><input type="text" name="search_societe" value="'
.
$_GET
[
"search_societe"
]
.
'" size="10"></td>'
;
print
'<td><input type="submit" class="button" value="'
.
$langs
->
trans
(
"Search"
)
.
'"></td>'
;
print
'<td><input type="submit" class="button" value="'
.
$langs
->
trans
(
"Search"
)
.
'"></td>'
;
print
'<td> </td>'
;
print
'<td> </td>'
;
print
'</form>'
;
print
'</form>'
;
print
'</tr>'
;
print
'</tr>'
;
$var
=
True
;
$var
=
True
;
while
(
$i
<
min
(
$num
,
$conf
->
liste_limit
))
while
(
$i
<
min
(
$num
,
$conf
->
liste_limit
))
...
@@ -125,20 +105,19 @@ if ($result)
...
@@ -125,20 +105,19 @@ if ($result)
print
"<tr
$bc[$var]
><td>"
;
print
"<tr
$bc[$var]
><td>"
;
print
'<a href="'
.
DOL_URL_ROOT
.
'/telephonie/ligne/fiche.php?id='
.
$obj
->
rowid
.
'">'
;
print
'<img border="0" src="./statut'
.
$obj
->
statut_ligne
.
'.png"></a> '
;
print
img_file
();
print
'<a href="'
.
DOL_URL_ROOT
.
'/compta/prelevement/ligne.php?id='
.
$obj
->
rowid_ligne
.
'">'
;
print
'</a> '
;
print
substr
(
'000000'
.
$obj
->
rowid_ligne
,
-
6
);
print
'</a></td>'
;
print
'<a href="fiche.php?id='
.
$obj
->
rowid
.
'">'
.
$obj
->
ref
.
"</a></td>
\n
"
;
print
'<td><img border="0" src="./statut'
.
$obj
->
statut
.
'.png"></a> '
;
print
'<td><a href="fiche.php?id='
.
$obj
->
rowid
.
'">'
.
$obj
->
facnumber
.
"</a></td>
\n
"
;
print
'<td><a href="fiche.php?id='
.
$obj
->
rowid
.
'">'
.
$obj
->
nom
.
"</a></td>
\n
"
;
print
'<a href="fiche.php?id='
.
$obj
->
rowid
.
'">'
.
$obj
->
ref
.
"</a></td>
\n
"
;
print
'<td><a href="fiche.php?id='
.
$obj
->
rowid
.
'">'
.
stripslashes
(
$obj
->
nom
)
.
"</a></td>
\n
"
;
print
'<td align="center">'
.
strftime
(
"%d/%m/%Y"
,
$obj
->
datec
)
.
"</td>
\n
"
;
print
'<td align="center">'
.
strftime
(
"%d/%m/%Y"
,
$obj
->
datec
)
.
"</td>
\n
"
;
print
'<td align="right">'
.
price
(
$obj
->
total_ttc
)
.
" euros</td>
\n
"
;
print
'<td align="right">'
.
price
(
$obj
->
amount
)
.
" euros</td>
\n
"
;
print
'<td align="center"><a href="fiche.php?id='
.
$obj
->
rowid
.
'">'
.
$obj
->
code_client
.
"</a></td>
\n
"
;
print
"</tr>
\n
"
;
print
"</tr>
\n
"
;
$i
++
;
$i
++
;
}
}
...
...
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