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
18ab1ab6
Commit
18ab1ab6
authored
9 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Plain Diff
Merge pull request #4634 from hregis/3.8_bug
Fix: issue when bank module is disabled
parents
be778874
d55ac472
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/modules/rapport/pdf_paiement.class.php
+10
-5
10 additions, 5 deletions
htdocs/core/modules/rapport/pdf_paiement.class.php
with
10 additions
and
5 deletions
htdocs/core/modules/rapport/pdf_paiement.class.php
+
10
−
5
View file @
18ab1ab6
...
...
@@ -146,10 +146,11 @@ class pdf_paiement
$num
=
0
;
$lines
=
array
();
// count number of li
g
ne of pay
e
ment
// count number of line
s
of payment
$sql
=
"SELECT p.rowid as prowid"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"paiement as p"
;
$sql
.
=
" WHERE p.datep BETWEEN '"
.
$this
->
db
->
idate
(
dol_get_first_day
(
$year
,
$month
))
.
"' AND '"
.
$this
->
db
->
idate
(
dol_get_last_day
(
$year
,
$month
))
.
"'"
;
$sql
.
=
" AND p.entity = "
.
$conf
->
entity
;
$result
=
$this
->
db
->
query
(
$sql
);
if
(
$result
)
{
...
...
@@ -160,19 +161,23 @@ class pdf_paiement
$sql
=
"SELECT p.datep as dp, f.facnumber"
;
//$sql .= ", c.libelle as paiement_type, p.num_paiement";
$sql
.
=
", c.code as paiement_code, p.num_paiement"
;
$sql
.
=
", p.amount as paiement_amount, f.total_ttc as facture_amount "
;
$sql
.
=
", pf.amount as pf_amount , ba.ref as bankaccount "
;
$sql
.
=
", p.amount as paiement_amount, f.total_ttc as facture_amount"
;
$sql
.
=
", pf.amount as pf_amount"
;
if
(
!
empty
(
$conf
->
banque
->
enabled
))
$sql
.
=
", ba.ref as bankaccount"
;
$sql
.
=
", p.rowid as prowid"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"paiement as p, "
.
MAIN_DB_PREFIX
.
"facture as f,"
;
$sql
.
=
" "
.
MAIN_DB_PREFIX
.
"c_paiement as c, "
.
MAIN_DB_PREFIX
.
"paiement_facture as pf,"
;
$sql
.
=
" "
.
MAIN_DB_PREFIX
.
"bank as b, "
.
MAIN_DB_PREFIX
.
"bank_account as ba,"
;
if
(
!
empty
(
$conf
->
banque
->
enabled
))
$sql
.
=
" "
.
MAIN_DB_PREFIX
.
"bank as b, "
.
MAIN_DB_PREFIX
.
"bank_account as ba,"
;
$sql
.
=
" "
.
MAIN_DB_PREFIX
.
"societe as s"
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
&&
!
$socid
)
{
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"societe_commerciaux as sc"
;
}
$sql
.
=
" WHERE f.fk_soc = s.rowid AND pf.fk_facture = f.rowid AND pf.fk_paiement = p.rowid"
;
$sql
.
=
" AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid "
;
if
(
!
empty
(
$conf
->
banque
->
enabled
))
$sql
.
=
" AND p.fk_bank = b.rowid AND b.fk_account = ba.rowid "
;
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND p.fk_paiement = c.id "
;
$sql
.
=
" AND p.datep BETWEEN '"
.
$this
->
db
->
idate
(
dol_get_first_day
(
$year
,
$month
))
.
"' AND '"
.
$this
->
db
->
idate
(
dol_get_last_day
(
$year
,
$month
))
.
"'"
;
...
...
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