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
0844b857
Commit
0844b857
authored
19 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Possibilité de définir le descriptif sur la ligne de propale meme pour un produit prédéfini.
parent
ac5c989d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/comm/propal.php
+13
-13
13 additions, 13 deletions
htdocs/comm/propal.php
htdocs/compta/propal.php
+22
-12
22 additions, 12 deletions
htdocs/compta/propal.php
with
35 additions
and
25 deletions
htdocs/comm/propal.php
+
13
−
13
View file @
0844b857
...
...
@@ -597,6 +597,8 @@ if ($_GET['propalid'])
print
'<td>'
.
$langs
->
trans
(
"Currency"
.
$conf
->
monnaie
)
.
'</td></tr>'
;
print
'<tr><td height="10">'
.
$langs
->
trans
(
'AmountTTC'
)
.
'</td><td align="right" colspan="2">'
.
price
(
$propal
->
total_ttc
)
.
'</td>'
;
print
'<td>'
.
$langs
->
trans
(
"Currency"
.
$conf
->
monnaie
)
.
'</td></tr>'
;
// Statut
print
'<tr><td height="10">'
.
$langs
->
trans
(
'Status'
)
.
'</td><td align="left" colspan="3">'
.
$propal
->
getLibStatut
()
.
'</td></tr>'
;
print
'</table><br>'
;
if
(
$propal
->
brouillon
==
1
&&
$user
->
rights
->
propale
->
creer
)
...
...
@@ -612,10 +614,10 @@ if ($_GET['propalid'])
$sql
.
=
' FROM '
.
MAIN_DB_PREFIX
.
'propaldet as pt 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.rowid ASC'
;
$res
ult
=
$db
->
query
(
$sql
);
if
(
$res
ult
)
$res
ql
=
$db
->
query
(
$sql
);
if
(
$res
ql
)
{
$num_lignes
=
$db
->
num_rows
(
$res
ult
);
$num_lignes
=
$db
->
num_rows
(
$res
ql
);
$i
=
0
;
$total
=
0
;
...
...
@@ -632,10 +634,10 @@ if ($_GET['propalid'])
print
'<td> </td><td> </td>'
;
print
"</tr>
\n
"
;
}
$var
=
T
rue
;
$var
=
t
rue
;
while
(
$i
<
$num_lignes
)
{
$objp
=
$db
->
fetch_object
(
$res
ult
);
$objp
=
$db
->
fetch_object
(
$res
ql
);
$var
=!
$var
;
if
(
$_GET
[
'action'
]
!=
'editline'
||
$_GET
[
'rowid'
]
!=
$objp
->
rowid
)
{
...
...
@@ -722,14 +724,12 @@ if ($_GET['propalid'])
print
'<td align="right"><input name="remise" type="text" size="2" value="'
.
$objp
->
remise_percent
.
'"> %</td>'
;
print
'<td align="center" colspan="3"><input type="submit" value="'
.
$langs
->
trans
(
"Save"
)
.
'"></td>'
;
print
'</tr></form>'
;
}
//
$total
=
$total
+
(
$objp
->
qty
*
$objp
->
price
);
$i
++
;
}
$db
->
free
(
$res
ult
);
$db
->
free
(
$res
ql
);
}
else
{
...
...
@@ -824,7 +824,7 @@ if ($_GET['propalid'])
/*
* B
arre d'a
ctions
* B
outons A
ctions
*/
if
(
$propal
->
statut
<
2
)
{
...
...
@@ -972,10 +972,10 @@ if ($_GET['propalid'])
$sql
=
'SELECT id, '
.
$db
->
pdate
(
'a.datea'
)
.
' as da, label, note, fk_user_author'
;
$sql
.
=
' FROM '
.
MAIN_DB_PREFIX
.
'actioncomm as a'
;
$sql
.
=
' WHERE a.fk_soc = '
.
$obj
->
idp
.
' AND a.propalrowid = '
.
$propal
->
id
;
$res
ult
=
$db
->
query
(
$sql
);
if
(
$res
ult
)
$res
ql
=
$db
->
query
(
$sql
);
if
(
$res
ql
)
{
$num
=
$db
->
num_rows
(
$res
ult
);
$num
=
$db
->
num_rows
(
$res
ql
);
if
(
$num
)
{
print_titre
(
$langs
->
trans
(
'ActionsOnPropal'
));
...
...
@@ -989,7 +989,7 @@ if ($_GET['propalid'])
while
(
$i
<
$num
)
{
$objp
=
$db
->
fetch_object
(
$res
ult
);
$objp
=
$db
->
fetch_object
(
$res
ql
);
$var
=!
$var
;
print
'<tr '
.
$bc
[
$var
]
.
'>'
;
print
'<td><a href="'
.
DOL_URL_ROOT
.
'/comm/action/fiche.php?id='
.
$objp
->
id
.
'">'
.
img_object
(
$langs
->
trans
(
'ShowTask'
),
'task'
)
.
' '
.
$objp
->
id
.
'</a></td>'
;
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/propal.php
+
22
−
12
View file @
0844b857
...
...
@@ -181,35 +181,44 @@ if ($_GET["propalid"])
// Receiver
$langs
->
load
(
'mails'
);
print
'<tr><td>'
.
$langs
->
trans
(
'MailTo'
)
.
'</td>'
;
print
'<td colspan="3">'
;
$dests
=
$societe
->
contact_array
(
$societe
->
id
);
$numdest
=
count
(
$dests
);
if
(
$numdest
==
0
)
{
print
'<td colspan="3">'
;
print
'<font class="error">Cette societe n\'a pas de contact, veuillez en crer un avant de faire votre proposition commerciale</font><br>'
;
print
'<a href="'
.
DOL_URL_ROOT
.
'/contact/fiche.php?socid='
.
$societe
->
id
.
'&action=create&backtoreferer=1">'
.
$langs
->
trans
(
'AddContact'
)
.
'</a>'
;
print
'</td>'
;
}
else
{
if
(
$propal
->
statut
==
0
&&
$user
->
rights
->
propale
->
creer
)
{
print
'<td colspan="2">'
;
print
'<form action="propal.php?propalid='
.
$propal
->
id
.
'" method="post">'
;
print
'<input type="hidden" name="action" value="set_contact">'
;
$form
->
select_contacts
(
$societe
->
id
,
$propal
->
contactid
,
'contactidp'
);
print
'</td><td>'
;
print
'<input type="submit" value="'
.
$langs
->
trans
(
'Modify'
)
.
'">'
;
print
'</form>'
;
print
'</td>'
;
}
else
{
if
(
!
empty
(
$propal
->
contactid
))
{
print
'<td colspan="3">'
;
require_once
(
DOL_DOCUMENT_ROOT
.
'/contact.class.php'
);
$contact
=
new
Contact
(
$db
);
$contact
->
fetch
(
$propal
->
contactid
);
print
'<a href="'
.
DOL_URL_ROOT
.
'/contact/fiche.php?id='
.
$propal
->
contactid
.
'" title="'
.
$langs
->
trans
(
'ShowContact'
)
.
'">'
;
print
$contact
->
firstname
.
' '
.
$contact
->
name
;
print
'</a>'
;
print
'</td>'
;
}
else
{
print
'<td colspan="3"> </td>'
;
}
}
}
...
...
@@ -319,12 +328,12 @@ if ($_GET["propalid"])
if
(
$num_lignes
)
{
print
'<tr class="liste_titre">'
;
print
'<td
width="54%"
>'
.
$langs
->
trans
(
'Description'
)
.
'</td>'
;
print
'<td
width="8%"
align="right">'
.
$langs
->
trans
(
'VAT'
)
.
'</td>'
;
print
'<td
width="12%"
align="right">'
.
$langs
->
trans
(
'PriceUHT'
)
.
'</td>'
;
print
'<td
width="8%"
align="right">'
.
$langs
->
trans
(
'Qty'
)
.
'</td>'
;
print
'<td
width="8%"
align="right">'
.
$langs
->
trans
(
'Discount'
)
.
'</td>'
;
print
'<td
width="10%"
align="right">'
.
$langs
->
trans
(
'AmountHT'
)
.
'</td>'
;
print
'<td>'
.
$langs
->
trans
(
'Description'
)
.
'</td>'
;
print
'<td align="right">'
.
$langs
->
trans
(
'VAT'
)
.
'</td>'
;
print
'<td align="right">'
.
$langs
->
trans
(
'PriceUHT'
)
.
'</td>'
;
print
'<td align="right">'
.
$langs
->
trans
(
'Qty'
)
.
'</td>'
;
print
'<td align="right">'
.
$langs
->
trans
(
'Discount'
)
.
'</td>'
;
print
'<td align="right">'
.
$langs
->
trans
(
'AmountHT'
)
.
'</td>'
;
print
'<td> </td><td> </td>'
;
print
"</tr>
\n
"
;
}
...
...
@@ -343,7 +352,7 @@ if ($_GET["propalid"])
print
img_object
(
$langs
->
trans
(
'ShowService'
),
'service'
);
else
print
img_object
(
$langs
->
trans
(
'ShowProduct'
),
'product'
);
print
' '
.
stripslashes
(
nl2br
(
$objp
->
description
?
$objp
->
description
:
$objp
->
product
))
.
'</a>'
;
print
' '
.
stripslashes
(
nl2br
(
$objp
->
product
))
.
'</a>'
;
if
(
$objp
->
date_start
&&
$objp
->
date_end
)
{
print
' (Du '
.
dolibarr_print_date
(
$objp
->
date_start
)
.
' au '
.
dolibarr_print_date
(
$objp
->
date_end
)
.
')'
;
...
...
@@ -356,6 +365,7 @@ if ($_GET["propalid"])
{
print
" (Jusqu'au "
.
dolibarr_print_date
(
$objp
->
date_end
)
.
')'
;
}
print
$objp
->
description
?
'<br>'
.
$objp
->
description
:
''
;
print
'</td>'
;
}
else
...
...
@@ -392,8 +402,7 @@ if ($_GET["propalid"])
print
'</tr>'
;
}
// Update ligne de facture
// \todo
$total
=
$total
+
(
$objp
->
qty
*
$objp
->
price
);
...
...
@@ -605,10 +614,11 @@ if ($_GET["propalid"])
if
(
!
$sortorder
)
$sortorder
=
"DESC"
;
if
(
$page
==
-
1
)
$page
=
0
;
$pageprev
=
$page
-
1
;
$pagenext
=
$page
+
1
;
$limit
=
$conf
->
liste_limit
;
$offset
=
$limit
*
$page
;
$pageprev
=
$page
-
1
;
$pagenext
=
$page
+
1
;
$sql
=
"SELECT s.nom, s.idp, p.rowid as propalid, p.price, p.ref, p.fk_statut, "
.
$db
->
pdate
(
"p.datep"
)
.
" as dp"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"societe as s, "
.
MAIN_DB_PREFIX
.
"propal as p "
;
...
...
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