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
a4561ab4
Commit
a4561ab4
authored
10 years ago
by
Florian Henry
Browse files
Options
Downloads
Patches
Plain Diff
merge
parent
ab504373
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/action/class/actioncomm.class.php
+3
-2
3 additions, 2 deletions
htdocs/comm/action/class/actioncomm.class.php
htdocs/compta/facture/class/facture.class.php
+46
-45
46 additions, 45 deletions
htdocs/compta/facture/class/facture.class.php
with
49 additions
and
47 deletions
htdocs/comm/action/class/actioncomm.class.php
+
3
−
2
View file @
a4561ab4
...
...
@@ -151,13 +151,14 @@ class ActionComm extends CommonObject
$this
->
userassigned
=
array
();
$this
->
userassigned
[
$tmpid
]
=
array
(
'id'
=>
$tmpid
);
}
$userownerid
=
$this
->
userownerid
;
$userdoneid
=
$this
->
userdoneid
;
// Be sure assigned user is defined as an array of array('id'=>,'mandatory'=>,...).
if
(
empty
(
$this
->
userassigned
)
||
count
(
$this
->
userassigned
)
==
0
||
!
is_array
(
$this
->
userassigned
))
$this
->
userassigned
=
array
(
$userownerid
=>
array
(
'id'
=>
$userownerid
));
if
(
!
$this
->
type_id
||
!
$this
->
type_code
)
{
$key
=
empty
(
$this
->
type_id
)
?
$this
->
type_code
:
$this
->
type_id
;
...
...
@@ -243,7 +244,7 @@ class ActionComm extends CommonObject
{
foreach
(
$this
->
userassigned
as
$key
=>
$val
)
{
if
(
!
is_array
(
$val
))
// For backward compatibility when valid
if
(
!
is_array
(
$val
))
// For backward compatibility when val
=
id
{
$tmpid
=
$val
;
$val
=
array
(
'id'
=>
$val
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/facture/class/facture.class.php
+
46
−
45
View file @
a4561ab4
...
...
@@ -279,17 +279,17 @@ class Facture extends CommonInvoice
$sql
.
=
", '"
.
$this
->
type
.
"'"
;
$sql
.
=
", '"
.
$socid
.
"'"
;
$sql
.
=
", '"
.
$this
->
db
->
idate
(
$now
)
.
"'"
;
$sql
.
=
","
.
(
$this
->
remise_absolue
>
0
?
$this
->
remise_absolue
:
'NULL'
);
$sql
.
=
","
.
(
$this
->
remise_percent
>
0
?
$this
->
remise_percent
:
'NULL'
);
$sql
.
=
",
"
.
(
$this
->
remise_absolue
>
0
?
$this
->
remise_absolue
:
'NULL'
);
$sql
.
=
",
"
.
(
$this
->
remise_percent
>
0
?
$this
->
remise_percent
:
'NULL'
);
$sql
.
=
", '"
.
$this
->
db
->
idate
(
$this
->
date
)
.
"'"
;
$sql
.
=
","
.
(
$this
->
note_private
?
"'"
.
$this
->
db
->
escape
(
$this
->
note_private
)
.
"'"
:
"null"
);
$sql
.
=
","
.
(
$this
->
note_public
?
"'"
.
$this
->
db
->
escape
(
$this
->
note_public
)
.
"'"
:
"null"
);
$sql
.
=
","
.
(
$this
->
ref_client
?
"'"
.
$this
->
db
->
escape
(
$this
->
ref_client
)
.
"'"
:
"null"
);
$sql
.
=
","
.
(
$this
->
ref_int
?
"'"
.
$this
->
db
->
escape
(
$this
->
ref_int
)
.
"'"
:
"null"
);
$sql
.
=
",
"
.
(
$this
->
note_private
?
"'"
.
$this
->
db
->
escape
(
$this
->
note_private
)
.
"'"
:
"null"
);
$sql
.
=
",
"
.
(
$this
->
note_public
?
"'"
.
$this
->
db
->
escape
(
$this
->
note_public
)
.
"'"
:
"null"
);
$sql
.
=
",
"
.
(
$this
->
ref_client
?
"'"
.
$this
->
db
->
escape
(
$this
->
ref_client
)
.
"'"
:
"null"
);
$sql
.
=
",
"
.
(
$this
->
ref_int
?
"'"
.
$this
->
db
->
escape
(
$this
->
ref_int
)
.
"'"
:
"null"
);
$sql
.
=
", "
.
(
$this
->
fk_account
>
0
?
$this
->
fk_account
:
'NULL'
);
$sql
.
=
","
.
(
$this
->
fk_facture_source
?
"'"
.
$this
->
db
->
escape
(
$this
->
fk_facture_source
)
.
"'"
:
"null"
);
$sql
.
=
","
.
(
$user
->
id
>
0
?
"'"
.
$user
->
id
.
"'"
:
"null"
);
$sql
.
=
","
.
(
$this
->
fk_project
?
$this
->
fk_project
:
"null"
);
$sql
.
=
",
"
.
(
$this
->
fk_facture_source
?
"'"
.
$this
->
db
->
escape
(
$this
->
fk_facture_source
)
.
"'"
:
"null"
);
$sql
.
=
",
"
.
(
$user
->
id
>
0
?
"'"
.
$user
->
id
.
"'"
:
"null"
);
$sql
.
=
",
"
.
(
$this
->
fk_project
?
$this
->
fk_project
:
"null"
);
$sql
.
=
", "
.
$this
->
cond_reglement_id
;
$sql
.
=
", "
.
$this
->
mode_reglement_id
;
$sql
.
=
", '"
.
$this
->
db
->
idate
(
$datelim
)
.
"', '"
.
$this
->
modelpdf
.
"'"
;
...
...
@@ -2537,9 +2537,9 @@ class Facture extends CommonInvoice
/**
* Return amount (with tax) of all credit notes and deposits invoices used by invoice
*
Return amount (with tax) of all credit notes and deposits invoices used by invoice
*
*
@return int <0 if KO, Sum of credit notes and deposits amount otherwise
*
@return int <0 if KO, Sum of credit notes and deposits amount otherwise
*/
function
getSumCreditNotesUsed
()
{
...
...
@@ -2559,9 +2559,9 @@ class Facture extends CommonInvoice
}
/**
* Return amount (with tax) of all deposits invoices used by invoice
*
Return amount (with tax) of all deposits invoices used by invoice
*
*
@return int <0 if KO, Sum of deposits amount otherwise
*
@return int <0 if KO, Sum of deposits amount otherwise
*/
function
getSumDepositsUsed
()
{
...
...
@@ -2600,52 +2600,53 @@ class Facture extends CommonInvoice
if
(
!
empty
(
$conf
->
global
->
FACTURE_ADDON
))
{
$mybool
=
false
;
$mybool
=
false
;
$file
=
$conf
->
global
->
FACTURE_ADDON
.
".php"
;
$classname
=
$conf
->
global
->
FACTURE_ADDON
;
// Include file with class
$file
=
$conf
->
global
->
FACTURE_ADDON
.
".php"
;
$classname
=
$conf
->
global
->
FACTURE_ADDON
;
// Include file with class
$dirmodels
=
array_merge
(
array
(
'/'
),
(
array
)
$conf
->
modules_parts
[
'models'
]);
foreach
(
$dirmodels
as
$reldir
)
{
$dir
=
dol_buildpath
(
$reldir
.
"core/modules/facture/"
);
// Load file with numbering class (if found)
$mybool
|=@
include_once
$dir
.
$file
;
}
// For compatibility
if
(
!
$mybool
)
{
$file
=
$conf
->
global
->
FACTURE_ADDON
.
"/"
.
$conf
->
global
->
FACTURE_ADDON
.
".modules.php"
;
$classname
=
"mod_facture_"
.
$conf
->
global
->
FACTURE_ADDON
;
$classname
=
preg_replace
(
'/\-.*$/'
,
''
,
$classname
);
// Include file with class
foreach
(
$conf
->
file
->
dol_document_root
as
$dirroot
)
{
$dir
=
$dirroot
.
"/core/modules/facture/"
;
// Load file with numbering class (if found)
$mybool
|=@
include_once
$dir
.
$file
;
}
}
if
(
!
$mybool
)
{
dol_print_error
(
''
,
"Failed to include file "
.
$file
);
return
''
;
}
// For compatibility
if
(
!
$mybool
)
{
$file
=
$conf
->
global
->
FACTURE_ADDON
.
"/"
.
$conf
->
global
->
FACTURE_ADDON
.
".modules.php"
;
$classname
=
"mod_facture_"
.
$conf
->
global
->
FACTURE_ADDON
;
$classname
=
preg_replace
(
'/\-.*$/'
,
''
,
$classname
);
// Include file with class
foreach
(
$conf
->
file
->
dol_document_root
as
$dirroot
)
{
$dir
=
$dirroot
.
"/core/modules/facture/"
;
// Load file with numbering class (if found)
$mybool
|=@
include_once
$dir
.
$file
;
}
}
if
(
!
$mybool
)
{
dol_print_error
(
''
,
"Failed to include file "
.
$file
);
return
''
;
}
$obj
=
new
$classname
();
$numref
=
""
;
$obj
=
new
$classname
();
$numref
=
""
;
$numref
=
$obj
->
getNextValue
(
$soc
,
$this
,
$mode
);
if
(
$numref
!=
""
)
{
return
$numref
;
}
else
{
if
(
$numref
!=
""
)
{
return
$numref
;
}
else
{
dol_print_error
(
$db
,
"Facture::getNextNumRef "
.
$obj
->
error
);
return
""
;
}
...
...
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