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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
a3e461c2
Commit
a3e461c2
authored
13 years ago
by
Regis Houssin
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of
git+ssh://git@github.com/Dolibarr/dolibarr.git
into develop
parents
c9ea31a9
dea5ec5e
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/compta/facture/class/facture.class.php
+11
-9
11 additions, 9 deletions
htdocs/compta/facture/class/facture.class.php
htdocs/core/class/commonobject.class.php
+6
-0
6 additions, 0 deletions
htdocs/core/class/commonobject.class.php
with
17 additions
and
9 deletions
htdocs/compta/facture/class/facture.class.php
+
11
−
9
View file @
a3e461c2
...
@@ -1941,20 +1941,23 @@ class Facture extends CommonObject
...
@@ -1941,20 +1941,23 @@ class Facture extends CommonObject
{
{
include_once
(
DOL_DOCUMENT_ROOT
.
'/core/lib/price.lib.php'
);
include_once
(
DOL_DOCUMENT_ROOT
.
'/core/lib/price.lib.php'
);
dol_syslog
(
"Facture::UpdateLine
$rowid
,
$desc
,
$pu
,
$qty
,
$remise_percent
,
$date_start
,
$date_end
,
$txtva
,
$txlocaltax1
,
$txlocaltax2
,
$price_base_type
,
$info_bits
,
$type
"
,
LOG_DEBUG
);
dol_syslog
(
"Facture::UpdateLine
$rowid
,
$desc
,
$pu
,
$qty
,
$remise_percent
,
$date_start
,
$date_end
,
$txtva
,
$txlocaltax1
,
$txlocaltax2
,
$price_base_type
,
$info_bits
,
$type
,
$fk_parent_line
"
,
LOG_DEBUG
);
if
(
$this
->
brouillon
)
if
(
$this
->
brouillon
)
{
{
$this
->
db
->
begin
();
$this
->
db
->
begin
();
// Clean parameters
// Clean parameters
if
(
empty
(
$qty
))
$qty
=
0
;
if
(
empty
(
$fk_parent_line
)
||
$fk_parent_line
<
0
)
$fk_parent_line
=
0
;
$remise_percent
=
price2num
(
$remise_percent
);
$remise_percent
=
price2num
(
$remise_percent
);
$qty
=
price2num
(
$qty
);
$qty
=
price2num
(
$qty
);
if
(
!
$qty
)
$qty
=
0
;
$pu
=
price2num
(
$pu
);
$pu
=
price2num
(
$pu
);
$txtva
=
price2num
(
$txtva
);
$txtva
=
price2num
(
$txtva
);
$txlocaltax1
=
price2num
(
$txlocaltax1
);
$txlocaltax1
=
price2num
(
$txlocaltax1
);
$txlocaltax2
=
price2num
(
$txlocaltax2
);
$txlocaltax2
=
price2num
(
$txlocaltax2
);
// Check parameters
// Check parameters
if
(
$type
<
0
)
return
-
1
;
if
(
$type
<
0
)
return
-
1
;
...
@@ -3593,7 +3596,6 @@ class FactureLigne
...
@@ -3593,7 +3596,6 @@ class FactureLigne
if
(
$this
->
date_end
)
{
$sql
.
=
",date_end='"
.
$this
->
db
->
idate
(
$this
->
date_end
)
.
"'"
;
}
if
(
$this
->
date_end
)
{
$sql
.
=
",date_end='"
.
$this
->
db
->
idate
(
$this
->
date_end
)
.
"'"
;
}
else
{
$sql
.
=
',date_end=null'
;
}
else
{
$sql
.
=
',date_end=null'
;
}
$sql
.
=
",product_type="
.
$this
->
product_type
;
$sql
.
=
",product_type="
.
$this
->
product_type
;
$sql
.
=
",rang='"
.
$this
->
rang
.
"'"
;
$sql
.
=
",info_bits='"
.
$this
->
info_bits
.
"'"
;
$sql
.
=
",info_bits='"
.
$this
->
info_bits
.
"'"
;
if
(
empty
(
$this
->
skip_update_total
))
if
(
empty
(
$this
->
skip_update_total
))
{
{
...
...
This diff is collapsed.
Click to expand it.
htdocs/core/class/commonobject.class.php
+
6
−
0
View file @
a3e461c2
...
@@ -839,6 +839,8 @@ abstract class CommonObject
...
@@ -839,6 +839,8 @@ abstract class CommonObject
$sql
.
=
' WHERE '
.
$this
->
fk_element
.
'='
.
$this
->
id
;
$sql
.
=
' WHERE '
.
$this
->
fk_element
.
'='
.
$this
->
id
;
if
(
!
$renum
)
$sql
.
=
' AND rang = 0'
;
if
(
!
$renum
)
$sql
.
=
' AND rang = 0'
;
if
(
$renum
)
$sql
.
=
' AND rang <> 0'
;
if
(
$renum
)
$sql
.
=
' AND rang <> 0'
;
dol_syslog
(
get_class
(
$this
)
.
"::line_order sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
if
(
$resql
)
{
{
...
@@ -850,6 +852,8 @@ abstract class CommonObject
...
@@ -850,6 +852,8 @@ abstract class CommonObject
$sql
=
'SELECT rowid FROM '
.
MAIN_DB_PREFIX
.
$this
->
table_element_line
;
$sql
=
'SELECT rowid FROM '
.
MAIN_DB_PREFIX
.
$this
->
table_element_line
;
$sql
.
=
' WHERE '
.
$this
->
fk_element
.
' = '
.
$this
->
id
;
$sql
.
=
' WHERE '
.
$this
->
fk_element
.
' = '
.
$this
->
id
;
$sql
.
=
' ORDER BY rang ASC, rowid '
.
$rowidorder
;
$sql
.
=
' ORDER BY rang ASC, rowid '
.
$rowidorder
;
dol_syslog
(
get_class
(
$this
)
.
"::line_order sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
if
(
$resql
)
{
{
...
@@ -910,6 +914,8 @@ abstract class CommonObject
...
@@ -910,6 +914,8 @@ abstract class CommonObject
{
{
$sql
=
'UPDATE '
.
MAIN_DB_PREFIX
.
$this
->
table_element_line
.
' SET rang = '
.
$rang
;
$sql
=
'UPDATE '
.
MAIN_DB_PREFIX
.
$this
->
table_element_line
.
' SET rang = '
.
$rang
;
$sql
.
=
' WHERE rowid = '
.
$rowid
;
$sql
.
=
' WHERE rowid = '
.
$rowid
;
dol_syslog
(
get_class
(
$this
)
.
"::updateRangOfLine sql="
.
$sql
,
LOG_DEBUG
);
if
(
!
$this
->
db
->
query
(
$sql
)
)
if
(
!
$this
->
db
->
query
(
$sql
)
)
{
{
dol_print_error
(
$this
->
db
);
dol_print_error
(
$this
->
db
);
...
...
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