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
073830eb
Commit
073830eb
authored
17 years ago
by
Regis Houssin
Browse files
Options
Downloads
Patches
Plain Diff
Fix: différenciation des produits et services
parent
901bdf36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
htdocs/langs/en_US/products.lang
+5
-1
5 additions, 1 deletion
htdocs/langs/en_US/products.lang
htdocs/langs/fr_FR/products.lang
+6
-2
6 additions, 2 deletions
htdocs/langs/fr_FR/products.lang
htdocs/product/index.php
+42
-20
42 additions, 20 deletions
htdocs/product/index.php
with
53 additions
and
23 deletions
htdocs/langs/en_US/products.lang
+
5
−
1
View file @
073830eb
...
...
@@ -25,7 +25,9 @@ ServicesOnSell=Services on sell
ServicesNotOnSell=Services out of sell
InternalRef=Internal reference
LastRecorded=Last products/services on sell recorded
LastRecordedProducts=Last %s products/services recorded
LastRecordedProductsAndServices=Last %s products/services recorded
LastRecordedProducts=Last %s products recorded
LastRecordedServices=Last %s services recorded
LastProducts=Last products
CardProduct0=Product card
CardProduct1=Service card
...
...
@@ -64,6 +66,8 @@ SupplierRef=Supplier ref.
ShowProduct=Show product
ShowService=Show service
ProductsAndServicesArea=Product and Services area
ProductsArea=Product area
ServicesArea=Services area
AddToMyProposals=Add to my proposals
AddToOtherProposals=Add to other proposals
AddToMyBills=Add to my bills
...
...
This diff is collapsed.
Click to expand it.
htdocs/langs/fr_FR/products.lang
+
6
−
2
View file @
073830eb
...
...
@@ -24,7 +24,9 @@ ServicesOnSell=Services en vente
ServicesNotOnSell=Services hors vente
InternalRef=Référence interne
LastRecorded=Derniers produits/services en vente enregistrés
LastRecordedProducts=Les %s derniers produits/services enregistrés
LastRecordedProductsAndServices=Les %s derniers produits/services enregistrés
LastRecordedProducts=Les %s derniers produits enregistrés
LastRecordedServices=Les %s derniers services enregistrés
LastProducts=Derniers produits
CardProduct0=Fiche produit
CardProduct1=Fiche service
...
...
@@ -62,7 +64,9 @@ Suppliers=Fournisseurs
SupplierRef=Réf. fournisseur
ShowProduct=Afficher produit
ShowService=Afficher service
ProductsAndServicesArea=Espace Produit et Services
ProductsAndServicesArea=Espace Produits et Services
ProductsArea=Espace Produits
ServicesArea=Espace Services
AddToMyProposals=Ajouter à mes propositions
AddToOtherProposals=Ajouter aux autres propositions
AddToMyBills=Ajouter à mes factures
...
...
This diff is collapsed.
Click to expand it.
htdocs/product/index.php
+
42
−
20
View file @
073830eb
<?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-200
6
Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-200
7
Regis Houssin <regis@dolibarr.fr>
*
* 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
...
...
@@ -41,9 +41,13 @@ $staticproduct=new Product($db);
*
*/
$transAreaType
=
$langs
->
trans
(
"ProductsAndServicesArea"
);
if
(
isset
(
$_GET
[
"type"
])
&&
$_GET
[
"type"
]
==
0
)
$transAreaType
=
$langs
->
trans
(
"ProductsArea"
);
if
(
isset
(
$_GET
[
"type"
])
&&
$_GET
[
"type"
]
==
1
)
$transAreaType
=
$langs
->
trans
(
"ServicesArea"
);
llxHeader
(
""
,
""
,
$langs
->
trans
(
"ProductsAndServices"
));
print_fiche_titre
(
$
langs
->
trans
(
"ProductsAndServicesArea"
)
);
print_fiche_titre
(
$
transAreaType
);
print
'<table border="0" width="100%" class="notopnoleftnoright">'
;
...
...
@@ -85,22 +89,35 @@ print '<table class="noborder" width="100%">';
print
'<tr class="liste_titre"><td colspan="2">'
.
$langs
->
trans
(
"Statistics"
)
.
'</td></tr>'
;
if
(
$conf
->
produit
->
enabled
)
{
print
"<tr
$bc[0]
>"
;
print
'<td><a href="liste.php?type=0&envente=0">'
.
$langs
->
trans
(
"ProductsNotOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
0
][
0
])
.
'</td>'
;
print
"</tr>"
;
print
"<tr
$bc[1]
>"
;
print
'<td><a href="liste.php?type=0&envente=1">'
.
$langs
->
trans
(
"ProductsOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
0
][
1
])
.
'</td>'
;
print
"</tr>"
;
$statProducts
=
"<tr
$bc[0]
>"
;
$statProducts
.
=
'<td><a href="liste.php?type=0&envente=0">'
.
$langs
->
trans
(
"ProductsNotOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
0
][
0
])
.
'</td>'
;
$statProducts
.
=
"</tr>"
;
$statProducts
.
=
"<tr
$bc[1]
>"
;
$statProducts
.
=
'<td><a href="liste.php?type=0&envente=1">'
.
$langs
->
trans
(
"ProductsOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
0
][
1
])
.
'</td>'
;
$statProducts
.
=
"</tr>"
;
}
if
(
$conf
->
service
->
enabled
)
{
print
"<tr
$bc[0]
>"
;
print
'<td><a href="liste.php?type=1&envente=0">'
.
$langs
->
trans
(
"ServicesNotOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
1
][
0
])
.
'</td>'
;
print
"</tr>"
;
print
"<tr
$bc[1]
>"
;
print
'<td><a href="liste.php?type=1&envente=1">'
.
$langs
->
trans
(
"ServicesOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
1
][
1
])
.
'</td>'
;
print
"</tr>"
;
$statServices
=
"<tr
$bc[0]
>"
;
$statServices
.
=
'<td><a href="liste.php?type=1&envente=0">'
.
$langs
->
trans
(
"ServicesNotOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
1
][
0
])
.
'</td>'
;
$statServices
.
=
"</tr>"
;
$statServices
.
=
"<tr
$bc[1]
>"
;
$statServices
.
=
'<td><a href="liste.php?type=1&envente=1">'
.
$langs
->
trans
(
"ServicesOnSell"
)
.
'</a></td><td align="right">'
.
round
(
$prodser
[
1
][
1
])
.
'</td>'
;
$statServices
.
=
"</tr>"
;
}
if
(
isset
(
$_GET
[
"type"
])
&&
$_GET
[
"type"
]
==
0
)
{
print
$statProducts
;
}
else
if
(
isset
(
$_GET
[
"type"
])
&&
$_GET
[
"type"
]
==
1
)
{
print
$statServices
;
}
else
{
print
$statProducts
.
$statServices
;
}
print
'</table>'
;
print
'</td><td valign="top" width="70%" class="notopnoleftnoright">'
;
...
...
@@ -119,6 +136,7 @@ if ($conf->categorie->enabled && !$user->rights->categorie->voir)
$sql
.
=
" LEFT JOIN "
.
MAIN_DB_PREFIX
.
"product_subproduct as sp ON p.rowid = sp.fk_product_subproduct"
;
$sql
.
=
" WHERE sp.fk_product_subproduct IS NULL"
;
if
(
$conf
->
categorie
->
enabled
&&
!
$user
->
rights
->
categorie
->
voir
)
$sql
.
=
" AND IFNULL(c.visible,1)=1 "
;
if
(
isset
(
$_GET
[
"type"
]))
$sql
.
=
" AND p.fk_product_type = "
.
$_GET
[
"type"
];
$sql
.
=
" ORDER BY p.datec DESC "
;
$sql
.
=
$db
->
plimit
(
$max
,
0
);
$result
=
$db
->
query
(
$sql
)
;
...
...
@@ -130,12 +148,16 @@ if ($result)
$i
=
0
;
if
(
$num
>
0
)
{
print
'<table class="noborder" width="100%">'
;
print
'<tr class="liste_titre"><td colspan="4">'
.
$langs
->
trans
(
"LastRecordedProducts"
,
$max
)
.
'</td></tr>'
;
{
$transRecordedType
=
$langs
->
trans
(
"LastRecordedProductsAndServices"
,
$max
);
if
(
isset
(
$_GET
[
"type"
])
&&
$_GET
[
"type"
]
==
0
)
$transRecordedType
=
$langs
->
trans
(
"LastRecordedProducts"
,
$max
);
if
(
isset
(
$_GET
[
"type"
])
&&
$_GET
[
"type"
]
==
1
)
$transRecordedType
=
$langs
->
trans
(
"LastRecordedServices"
,
$max
);
print
'<table class="noborder" width="100%">'
;
print
'<tr class="liste_titre"><td colspan="4">'
.
$transRecordedType
.
'</td></tr>'
;
$var
=
True
;
$var
=
True
;
while
(
$i
<
$num
)
{
...
...
@@ -162,7 +184,7 @@ if ($result)
print
"</a> <a href=
\"
fiche.php?id=
$objp->rowid
\"
>
$objp->ref
</a></td>
\n
"
;
print
'<td>'
.
dolibarr_trunc
(
$objp
->
label
,
40
)
.
'</td>'
;
print
"<td>"
;
if
(
$objp
->
type
==
1
)
print
$langs
->
trans
(
"ShowService"
);
if
(
$objp
->
fk_product_
type
==
1
)
print
$langs
->
trans
(
"ShowService"
);
else
print
$langs
->
trans
(
"ShowProduct"
);
print
"</td>"
;
print
'<td align="right" nowrap="nowrap">'
;
...
...
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