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
a9eeb333
Commit
a9eeb333
authored
17 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: uniformisation du code
parent
fcda556b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/comm/propal.php
+1
-2
1 addition, 2 deletions
htdocs/comm/propal.php
htdocs/compta/propal.php
+49
-35
49 additions, 35 deletions
htdocs/compta/propal.php
with
50 additions
and
37 deletions
htdocs/comm/propal.php
+
1
−
2
View file @
a9eeb333
...
...
@@ -1022,9 +1022,9 @@ if ($_GET['propalid'] > 0)
}
else
{
print
'</td></tr></table>'
;
if
(
!
empty
(
$propal
->
projetidp
))
{
print
'</td></tr></table>'
;
print
'<td colspan="3">'
;
$proj
=
new
Project
(
$db
);
$proj
->
fetch
(
$propal
->
projetidp
);
...
...
@@ -1034,7 +1034,6 @@ if ($_GET['propalid'] > 0)
print
'</td>'
;
}
else
{
print
'</td></tr></table>'
;
print
'<td colspan="3"> </td>'
;
}
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/propal.php
+
49
−
35
View file @
a9eeb333
...
...
@@ -244,39 +244,52 @@ if ($_GET["propalid"] > 0)
if
(
$conf
->
projet
->
enabled
)
{
$langs
->
load
(
"projects"
);
print
'<tr><td>'
.
$langs
->
trans
(
'Project'
)
.
'</td>'
;
print
'<tr><td>'
;
print
'<table class="nobordernopadding" width="100%"><tr><td>'
;
print
$langs
->
trans
(
'Project'
)
.
'</td>'
;
$numprojet
=
$societe
->
has_projects
();
if
(
!
$numprojet
)
{
print
'<td colspan="2">'
;
print
$langs
->
trans
(
"NoProject"
)
.
'</td><td>'
;
print
'<a href=../projet/fiche.php?socid='
.
$societe
->
id
.
'&action=create>'
.
$langs
->
trans
(
'AddProject'
)
.
'</a>'
;
print
'</td>'
;
print
'</td></tr></table>'
;
print
'<td colspan="2">'
;
print
$langs
->
trans
(
"NoProject"
)
.
'</td><td>'
;
print
'<a href=../projet/fiche.php?socid='
.
$societe
->
id
.
'&action=create>'
.
$langs
->
trans
(
'AddProject'
)
.
'</a>'
;
print
'</td>'
;
}
else
{
if
(
$propal
->
statut
==
0
&&
$user
->
rights
->
propale
->
creer
)
if
(
$propal
->
statut
==
0
&&
$user
->
rights
->
propale
->
creer
)
{
if
(
$_GET
[
'action'
]
!=
'classer'
&&
$propal
->
brouillon
)
print
'<td align="right"><a href="'
.
$_SERVER
[
'PHP_SELF'
]
.
'?action=classer&propalid='
.
$propal
->
id
.
'">'
.
img_edit
(
$langs
->
trans
(
'SetProject'
))
.
'</a></td>'
;
print
'</tr></table>'
;
print
'</td><td colspan="3">'
;
if
(
$_GET
[
'action'
]
==
'classer'
)
{
$html
->
form_project
(
$_SERVER
[
'PHP_SELF'
]
.
'?propalid='
.
$propal
->
id
,
$propal
->
socid
,
$propal
->
projetidp
,
'projetidp'
);
}
else
{
$html
->
form_project
(
$_SERVER
[
'PHP_SELF'
]
.
'?propalid='
.
$propal
->
id
,
$propal
->
socid
,
$propal
->
projetidp
,
'none'
);
}
print
'</td></tr>'
;
}
else
{
print
'</td></tr></table>'
;
if
(
!
empty
(
$propal
->
projetidp
))
{
print
'<td colspan="3">'
;
$html
->
select_projects
(
$societe
->
id
,
$propal
->
projetidp
,
'projetidp'
);
print
'</td>'
;
print
'<td colspan="3">'
;
$proj
=
new
Project
(
$db
);
$proj
->
fetch
(
$propal
->
projetidp
);
print
'<a href="../projet/fiche.php?id='
.
$propal
->
projetidp
.
'" title="'
.
$langs
->
trans
(
'ShowProject'
)
.
'">'
;
print
$proj
->
title
;
print
'</a>'
;
print
'</td>'
;
}
else
{
if
(
!
empty
(
$propal
->
projetidp
))
{
print
'<td colspan="3">'
;
$proj
=
new
Project
(
$db
);
$proj
->
fetch
(
$propal
->
projetidp
);
print
'<a href="../projet/fiche.php?id='
.
$propal
->
projetidp
.
'" title="'
.
$langs
->
trans
(
'ShowProject'
)
.
'">'
;
print
$proj
->
title
;
print
'</a>'
;
print
'</td>'
;
}
else
{
print
'<td colspan="3"> </td>'
;
}
else
{
print
'<td colspan="3"> </td>'
;
}
}
}
print
'</tr>'
;
}
...
...
@@ -300,23 +313,24 @@ if ($_GET["propalid"] > 0)
* Lignes de propale
*
*/
$sql
=
'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.fk_remise_except,'
;
$sql
.
=
' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,'
;
$sql
.
=
' pt.total_ht, pt.total_tva, pt.total_ttc,'
;
$sql
.
=
' p.rowid as prodid, p.label as product, p.ref, p.fk_product_type, '
;
$sql
.
=
' p.description as product_desc'
;
$sql
.
=
' FROM '
.
MAIN_DB_PREFIX
.
'propaldet as pt'
;
$sql
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'product as p ON pt.fk_product=p.rowid'
;
$sql
.
=
' WHERE pt.fk_propal = '
.
$propal
->
id
;
$sql
.
=
' ORDER BY pt.rang ASC, pt.rowid'
;
print
'<table class="noborder" width="100%">'
;
$sql
=
'SELECT pt.rowid, pt.description, pt.price, pt.fk_product, pt.fk_remise_except,'
;
$sql
.
=
' pt.qty, pt.tva_tx, pt.remise_percent, pt.subprice, pt.info_bits,'
;
$sql
.
=
' pt.total_ht, pt.total_tva, pt.total_ttc,'
;
$sql
.
=
' p.rowid as prodid, p.label as product, p.ref, p.fk_product_type, '
;
$sql
.
=
' p.description as product_desc'
;
$sql
.
=
' FROM '
.
MAIN_DB_PREFIX
.
'propaldet as pt'
;
$sql
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'product as p ON pt.fk_product=p.rowid'
;
$sql
.
=
' WHERE pt.fk_propal = '
.
$propal
->
id
;
$sql
.
=
' ORDER BY pt.rang ASC, pt.rowid'
;
$resql
=
$db
->
query
(
$sql
);
if
(
$resql
)
{
$num_lignes
=
$db
->
num_rows
(
$resql
);
$i
=
0
;
$total
=
0
;
print
'<table class="noborder" width="100%">'
;
if
(
$num_lignes
)
{
print
'<tr class="liste_titre">'
;
...
...
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