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
00aa9060
Commit
00aa9060
authored
13 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Qual: Removed a FIXME
parent
83acf605
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/fourn/class/fournisseur.class.php
+9
-7
9 additions, 7 deletions
htdocs/fourn/class/fournisseur.class.php
htdocs/fourn/fiche.php
+1
-1
1 addition, 1 deletion
htdocs/fourn/fiche.php
with
10 additions
and
8 deletions
htdocs/fourn/class/fournisseur.class.php
+
9
−
7
View file @
00aa9060
...
...
@@ -2,7 +2,7 @@
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -82,19 +82,21 @@ class Fournisseur extends Societe
}
/**
* FIXME This returns number of prices, not number of products. Is it what we want ?
* Returns number of ref prices (not number of products).
*
* @return int Nb of ref prices, or <0 if error
*/
function
Nb
Product
()
function
nbOf
Product
Refs
()
{
$sql
=
"SELECT count(pfp.rowid)"
;
$sql
=
"SELECT count(pfp.rowid)
as nb
"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"product_fournisseur_price as pfp"
;
$sql
.
=
" WHERE pfp.fk_soc = "
.
$this
->
id
;
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
{
$
row
=
$this
->
db
->
fetch_
row
(
$resql
);
return
$
row
[
0
]
;
$
obj
=
$this
->
db
->
fetch_
object
(
$resql
);
return
$
obj
->
nb
;
}
else
{
...
...
@@ -104,7 +106,7 @@ class Fournisseur extends Societe
/**
* Create the order from an existing
*
*
* @param User $user Creator user
* @param int $idc Id source
* @param int $comclientid Id thirdparty
...
...
This diff is collapsed.
Click to expand it.
htdocs/fourn/fiche.php
+
1
−
1
View file @
00aa9060
...
...
@@ -229,7 +229,7 @@ if ($object->fetch($id))
print
'<table class="noborder" width="100%">'
;
print
'<tr class="liste_titre">'
;
print
'<td>'
.
$langs
->
trans
(
"ProductsAndServices"
)
.
'</td><td align="right">'
;
print
'<a href="'
.
DOL_URL_ROOT
.
'/fourn/product/liste.php?fourn_id='
.
$object
->
id
.
'">'
.
$langs
->
trans
(
"All"
)
.
' ('
.
$object
->
Nb
Product
()
.
')'
;
print
'<a href="'
.
DOL_URL_ROOT
.
'/fourn/product/liste.php?fourn_id='
.
$object
->
id
.
'">'
.
$langs
->
trans
(
"All"
)
.
' ('
.
$object
->
nbOf
Product
Refs
()
.
')'
;
print
'</a></td></tr></table>'
;
}
...
...
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