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
055397a9
Commit
055397a9
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Can attach supplier order to a customer order.
parent
80653409
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
ChangeLog
+1
-0
1 addition, 0 deletions
ChangeLog
htdocs/fourn/facture/fiche.php
+70
-0
70 additions, 0 deletions
htdocs/fourn/facture/fiche.php
with
71 additions
and
0 deletions
ChangeLog
+
1
−
0
View file @
055397a9
...
...
@@ -5,6 +5,7 @@ English Dolibarr ChangeLog
***** ChangeLog for 3.7 compared to 3.6.* *****
For users:
- New: Can attach supplier order to a customer order.
- New: Supervisor is now visible into user list.
- New: Add user of creation and validation on invoice export.
- New: Add info page about browser.
...
...
This diff is collapsed.
Click to expand it.
htdocs/fourn/facture/fiche.php
+
70
−
0
View file @
055397a9
...
...
@@ -804,6 +804,13 @@ elseif ($action == 'reopen' && $user->rights->fournisseur->facture->creer)
}
}
// Link invoice to order
if
(
GETPOST
(
'linkedOrder'
))
{
$object
->
fetch
(
$id
);
$object
->
fetch_thirdparty
();
$result
=
$object
->
add_object_linked
(
'commande'
,
GETPOST
(
'linkedOrder'
));
}
// Add file in email form
if
(
GETPOST
(
'addfile'
))
{
...
...
@@ -2233,6 +2240,69 @@ else
*/
$somethingshown
=
$object
->
showLinkedObjectBlock
();
if
(
empty
(
$somethingshown
)
&&
!
empty
(
$conf
->
fournisseur
->
enabled
))
{
print
'<br><a href="#" id="linktoorder">'
.
$langs
->
trans
(
'LinkedOrder'
)
.
'</a>'
;
print
'
<script type="text/javascript" language="javascript">
jQuery(document).ready(function() {
jQuery("#linktoorder").click(function() {
jQuery("#commande").toggle();
});
});
</script>
'
;
print
'<div id="commande" style="display:none">'
;
$sql
=
"SELECT s.rowid as socid, s.nom as name, s.client, c.rowid, c.ref, c.ref_supplier, c.total_ht"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"societe as s"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"commande_fournisseur as c"
;
$sql
.
=
' WHERE c.fk_soc = s.rowid AND c.fk_soc = '
.
$societe
->
id
;
$resqlorderlist
=
$db
->
query
(
$sql
);
if
(
$resqlorderlist
)
{
$num
=
$db
->
num_rows
(
$resqlorderlist
);
$i
=
0
;
print
'<form action="" method="POST" name="LinkedOrder">'
;
print
'<table class="noborder">'
;
print
'<tr class="liste_titre">'
;
print
'<td class="nowrap"></td>'
;
print
'<td align="center">'
.
$langs
->
trans
(
"Ref"
)
.
'</td>'
;
print
'<td align="left">'
.
$langs
->
trans
(
"RefSupplier"
)
.
'</td>'
;
print
'<td align="left">'
.
$langs
->
trans
(
"AmountHTShort"
)
.
'</td>'
;
print
'<td align="left">'
.
$langs
->
trans
(
"Company"
)
.
'</td>'
;
print
'</tr>'
;
while
(
$i
<
$num
)
{
$objp
=
$db
->
fetch_object
(
$resqlorderlist
);
if
(
$objp
->
socid
==
$societe
->
id
)
{
$var
=
!
$var
;
print
'<tr '
.
$bc
[
$var
]
.
'>'
;
print
'<td aling="left">'
;
print
'<input type="radio" name="linkedOrder" value='
.
$objp
->
rowid
.
'>'
;
print
'<td align="center">'
.
$objp
->
ref
.
'</td>'
;
print
'<td>'
.
$objp
->
ref_supplier
.
'</td>'
;
print
'<td>'
.
price
(
$objp
->
total_ht
)
.
'</td>'
;
print
'<td>'
.
$objp
->
name
.
'</td>'
;
print
'</td>'
;
print
'</tr>'
;
}
$i
++
;
}
print
'</table>'
;
print
'<br><center><input type="submit" class="button" value="'
.
$langs
->
trans
(
'ToLink'
)
.
'"></center>'
;
print
'</form>'
;
$db
->
free
(
$resqlorderlist
);
}
else
{
dol_print_error
(
$db
);
}
print
'</div>'
;
}
print
'</div><div class="fichehalfright"><div class="ficheaddleft">'
;
//print '</td><td valign="top" width="50%">';
//print '<br>';
...
...
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