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
fc9c491d
Commit
fc9c491d
authored
10 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
New: Add constant to set label for level prices.
parent
9dd605bd
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/fiche.php
+6
-8
6 additions, 8 deletions
htdocs/comm/fiche.php
htdocs/product/price.php
+21
-9
21 additions, 9 deletions
htdocs/product/price.php
with
27 additions
and
17 deletions
htdocs/comm/fiche.php
+
6
−
8
View file @
fc9c491d
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-201
3
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-201
4
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
...
...
@@ -187,9 +187,6 @@ if ($id > 0)
dol_print_error
(
$db
,
$object
->
error
);
}
/*
* Affichage onglets
*/
$head
=
societe_prepare_head
(
$object
);
...
...
@@ -397,7 +394,6 @@ if ($id > 0)
print
'</tr>'
;
}
// Multiprice level
if
(
!
empty
(
$conf
->
global
->
PRODUIT_MULTIPRICES
))
{
...
...
@@ -410,7 +406,11 @@ if ($id > 0)
print
'<a href="'
.
DOL_URL_ROOT
.
'/comm/multiprix.php?id='
.
$object
->
id
.
'">'
.
img_edit
(
$langs
->
trans
(
"Modify"
))
.
'</a>'
;
}
print
'</td></tr></table>'
;
print
'</td><td colspan="3">'
.
$object
->
price_level
.
"</td>"
;
print
'</td><td colspan="3">'
;
print
$object
->
price_level
;
$keyforlabel
=
'PRODUIT_MULTIPRICES_LABEL'
.
$object
->
price_level
;
if
(
!
empty
(
$conf
->
global
->
$keyforlabel
))
print
' - '
.
$langs
->
trans
(
$conf
->
global
->
$keyforlabel
);
print
"</td>"
;
print
'</tr>'
;
}
...
...
@@ -887,11 +887,9 @@ if ($id > 0)
}
print
'</div>'
;
print
"<br>
\n
"
;
if
(
!
empty
(
$conf
->
global
->
MAIN_REPEATCONTACTONEACHTAB
))
{
print
'<br>'
;
// List of contacts
show_contacts
(
$conf
,
$langs
,
$db
,
$object
,
$_SERVER
[
"PHP_SELF"
]
.
'?socid='
.
$object
->
id
);
}
...
...
This diff is collapsed.
Click to expand it.
htdocs/product/price.php
+
21
−
9
View file @
fc9c491d
<?php
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-201
2
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-201
4
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2013 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
...
...
@@ -59,14 +59,17 @@ if ($action == 'update_price' && ! $_POST ["cancel"] && ($user->rights->produit-
$result
=
$object
->
fetch
(
$id
);
// MultiPrix
if
(
!
empty
(
$conf
->
global
->
PRODUIT_MULTIPRICES
))
{
if
(
!
empty
(
$conf
->
global
->
PRODUIT_MULTIPRICES
))
{
$newprice
=
''
;
$newprice_min
=
''
;
$newpricebase
=
''
;
$newvat
=
''
;
for
(
$i
=
1
;
$i
<=
$conf
->
global
->
PRODUIT_MULTIPRICES_LIMIT
;
$i
++
)
{
if
(
isset
(
$_POST
[
"price_"
.
$i
]))
{
for
(
$i
=
1
;
$i
<=
$conf
->
global
->
PRODUIT_MULTIPRICES_LIMIT
;
$i
++
)
{
if
(
isset
(
$_POST
[
"price_"
.
$i
]))
{
$level
=
$i
;
$newprice
=
price2num
(
$_POST
[
"price_"
.
$i
],
'MU'
);
$newprice_min
=
price2num
(
$_POST
[
"price_min_"
.
$i
],
'MU'
);
...
...
@@ -129,8 +132,8 @@ if ($action == 'update_price_by_qty') { // Ajout / Mise à jour d'un prix par qu
// $newminprice=price2num(GETPOST("price_min"),'MU'); // TODO : Add min price management
$quantity
=
GETPOST
(
'quantity'
);
$remise_percent
=
price2num
(
GETPOST
(
'remise_percent'
));
$remise
=
0
;
// TODO : allow di
c
sount by amount when available on documents
$remise
=
0
;
// TODO : allow dis
c
ount by amount when available on documents
if
(
empty
(
$quantity
))
{
$error
++
;
$mesg
=
'<div class="error">'
.
$langs
->
trans
(
"ErrorFieldRequired"
,
$langs
->
transnoentities
(
"Qty"
))
.
'</div>'
;
...
...
@@ -327,15 +330,24 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) {
// TVA
print
'<tr><td>'
.
$langs
->
trans
(
"VATRate"
)
.
'</td><td>'
.
vatrate
(
$object
->
multiprices_tva_tx
[
"
$soc->price_level
"
],
true
)
.
'</td></tr>'
;
}
else
{
for
(
$i
=
1
;
$i
<=
$conf
->
global
->
PRODUIT_MULTIPRICES_LIMIT
;
$i
++
)
{
}
else
{
for
(
$i
=
1
;
$i
<=
$conf
->
global
->
PRODUIT_MULTIPRICES_LIMIT
;
$i
++
)
{
// TVA
if
(
$i
==
1
)
// We show only price for level 1
{
print
'<tr><td>'
.
$langs
->
trans
(
"VATRate"
)
.
'</td><td>'
.
vatrate
(
$object
->
multiprices_tva_tx
[
1
],
true
)
.
'</td></tr>'
;
}
print
'<tr><td>'
.
$langs
->
trans
(
"SellingPrice"
)
.
' '
.
$i
.
'</td>'
;
print
'<tr>'
;
// Label of price
print
'<td>'
.
$langs
->
trans
(
"SellingPrice"
)
.
' '
.
$i
;
$keyforlabel
=
'PRODUIT_MULTIPRICES_LABEL'
.
$i
;
if
(
!
empty
(
$conf
->
global
->
$keyforlabel
))
print
' - '
.
$langs
->
trans
(
$conf
->
global
->
$keyforlabel
);
print
'</td>'
;
if
(
$object
->
multiprices_base_type
[
"
$i
"
]
==
'TTC'
)
{
print
'<td>'
.
price
(
$object
->
multiprices_ttc
[
"
$i
"
]);
...
...
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