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
6a770e85
Commit
6a770e85
authored
11 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/3.4' into 3.4_backported
parents
da18b8a5
1dc3412b
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ChangeLog
+2
-1
2 additions, 1 deletion
ChangeLog
htdocs/compta/resultat/clientfourn.php
+32
-25
32 additions, 25 deletions
htdocs/compta/resultat/clientfourn.php
with
34 additions
and
26 deletions
ChangeLog
+
2
−
1
View file @
6a770e85
...
@@ -10,6 +10,7 @@ Fix: Add a limit into list to avoid browser to hang when database is too large.
...
@@ -10,6 +10,7 @@ Fix: Add a limit into list to avoid browser to hang when database is too large.
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
Fix: [ bug #1212 ] 'jqueryFileTree.php' directory traversal vulnerability
Fix: Agenda and Banks module were not working with multicompany module
Fix: Agenda and Banks module were not working with multicompany module
Fix: [ bug #1317 ] Removing a category does not remove all child categories
Fix: [ bug #1317 ] Removing a category does not remove all child categories
Fix: [ bug #1380 ] Customer invoices are not grouped in company results report.
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
***** ChangeLog for 3.4.2 compared to 3.4.1 *****
Fix: field's problem into company's page (RIB).
Fix: field's problem into company's page (RIB).
...
@@ -238,7 +239,7 @@ For users:
...
@@ -238,7 +239,7 @@ For users:
- New: Can list elements (invoices, orders or proposals) on a particular
- New: Can list elements (invoices, orders or proposals) on a particular
user contact). This allow to view a "basket" of its elements.
user contact). This allow to view a "basket" of its elements.
- New: Show bank account on payment list of invoice card.
- New: Show bank account on payment list of invoice card.
- New: Cloning project allow to clones task, notes, files, contacts.
- New: Cloning project allow to clones task, notes,
projects files, tasks
files, contacts.
- New: Enhance default style.
- New: Enhance default style.
- New: Can edit and resiliate member status from list.
- New: Can edit and resiliate member status from list.
- New: Can insert URL links into elements lines. Also reported into PDF.
- New: Can insert URL links into elements lines. Also reported into PDF.
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/resultat/clientfourn.php
+
32
−
25
View file @
6a770e85
...
@@ -185,7 +185,7 @@ else
...
@@ -185,7 +185,7 @@ else
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
if
(
$socid
)
$sql
.
=
" AND f.fk_soc = "
.
$socid
;
if
(
$socid
)
$sql
.
=
" AND f.fk_soc = "
.
$socid
;
$sql
.
=
" GROUP BY s.nom, s.rowid"
;
$sql
.
=
" GROUP BY s.nom, s.rowid"
;
$sql
.
=
" ORDER BY s.nom"
;
$sql
.
=
" ORDER BY s.nom
, s.rowid
"
;
dol_syslog
(
"get customer invoices sql="
.
$sql
);
dol_syslog
(
"get customer invoices sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
$result
=
$db
->
query
(
$sql
);
...
@@ -279,11 +279,11 @@ print '</tr>';
...
@@ -279,11 +279,11 @@ print '</tr>';
/*
/*
*
Frais, factures fournisseurs.
*
Suppliers invoices
*/
*/
if
(
$modecompta
==
'CREANCES-DETTES'
)
if
(
$modecompta
==
'CREANCES-DETTES'
)
{
{
$sql
=
"SELECT s.nom, s.rowid as socid,
date_format(f.datef,'%Y-%m') as dm,
sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc"
;
$sql
=
"SELECT s.nom, s.rowid as socid, sum(f.total_ht) as amount_ht, sum(f.total_ttc) as amount_ttc"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"societe as s"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"societe as s"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"facture_fourn as f"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"facture_fourn as f"
;
$sql
.
=
" WHERE f.fk_soc = s.rowid"
;
$sql
.
=
" WHERE f.fk_soc = s.rowid"
;
...
@@ -297,7 +297,7 @@ if ($modecompta == 'CREANCES-DETTES')
...
@@ -297,7 +297,7 @@ if ($modecompta == 'CREANCES-DETTES')
}
}
else
else
{
{
$sql
=
"SELECT s.nom, s.rowid as socid,
date_format(p.datep,'%Y-%m') as dm,
sum(pf.amount) as amount_ttc"
;
$sql
=
"SELECT s.nom, s.rowid as socid, sum(pf.amount) as amount_ttc"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"paiementfourn as p"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"paiementfourn as p"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"paiementfourn_facturefourn as pf"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"paiementfourn_facturefourn as pf"
;
$sql
.
=
" LEFT JOIN "
.
MAIN_DB_PREFIX
.
"facture_fourn as f"
;
$sql
.
=
" LEFT JOIN "
.
MAIN_DB_PREFIX
.
"facture_fourn as f"
;
...
@@ -310,7 +310,7 @@ else
...
@@ -310,7 +310,7 @@ else
}
}
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND f.entity = "
.
$conf
->
entity
;
if
(
$socid
)
$sql
.
=
" AND f.fk_soc = "
.
$socid
;
if
(
$socid
)
$sql
.
=
" AND f.fk_soc = "
.
$socid
;
$sql
.
=
" GROUP BY s.nom, s.rowid
, dm
"
;
$sql
.
=
" GROUP BY s.nom, s.rowid"
;
$sql
.
=
" ORDER BY s.nom, s.rowid"
;
$sql
.
=
" ORDER BY s.nom, s.rowid"
;
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"SuppliersInvoices"
)
.
'</td></tr>'
;
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"SuppliersInvoices"
)
.
'</td></tr>'
;
...
@@ -370,11 +370,11 @@ print '</tr>';
...
@@ -370,11 +370,11 @@ print '</tr>';
* Charges sociales non deductibles
* Charges sociales non deductibles
*/
*/
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"SocialContributions"
)
.
'</td></tr>'
;
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"SocialContributions"
)
.
'
('
.
$langs
->
trans
(
"Type"
)
.
' 0)
</td></tr>'
;
if
(
$modecompta
==
'CREANCES-DETTES'
)
if
(
$modecompta
==
'CREANCES-DETTES'
)
{
{
$sql
=
"SELECT c.libelle as nom, sum(cs.amount) as amount"
;
$sql
=
"SELECT
c.id,
c.libelle as nom, sum(cs.amount) as amount"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
" WHERE cs.fk_type = c.id"
;
$sql
.
=
" WHERE cs.fk_type = c.id"
;
...
@@ -384,7 +384,7 @@ if ($modecompta == 'CREANCES-DETTES')
...
@@ -384,7 +384,7 @@ if ($modecompta == 'CREANCES-DETTES')
}
}
else
else
{
{
$sql
=
"SELECT c.libelle as nom, sum(p.amount) as amount"
;
$sql
=
"SELECT
c.id,
c.libelle as nom, sum(p.amount) as amount"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"paiementcharge as p"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"paiementcharge as p"
;
...
@@ -395,8 +395,8 @@ else
...
@@ -395,8 +395,8 @@ else
$sql
.
=
" AND p.datep >= '"
.
$db
->
idate
(
$date_start
)
.
"' AND p.datep <= '"
.
$db
->
idate
(
$date_end
)
.
"'"
;
$sql
.
=
" AND p.datep >= '"
.
$db
->
idate
(
$date_start
)
.
"' AND p.datep <= '"
.
$db
->
idate
(
$date_end
)
.
"'"
;
}
}
$sql
.
=
" AND cs.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND cs.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY c.libelle"
;
$sql
.
=
" GROUP BY c.libelle
, c.id
"
;
$sql
.
=
" ORDER BY c.libelle"
;
$sql
.
=
" ORDER BY c.libelle
, c.id
"
;
dol_syslog
(
"get social contributions deductible=0 sql="
.
$sql
);
dol_syslog
(
"get social contributions deductible=0 sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
$result
=
$db
->
query
(
$sql
);
...
@@ -444,11 +444,11 @@ print '</tr>';
...
@@ -444,11 +444,11 @@ print '</tr>';
* Charges sociales deductibles
* Charges sociales deductibles
*/
*/
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"SocialContributions"
)
.
'</td></tr>'
;
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"SocialContributions"
)
.
'
('
.
$langs
->
trans
(
"Type"
)
.
' 1)
</td></tr>'
;
if
(
$modecompta
==
'CREANCES-DETTES'
)
if
(
$modecompta
==
'CREANCES-DETTES'
)
{
{
$sql
=
"SELECT c.libelle as nom, sum(cs.amount) as amount"
;
$sql
=
"SELECT
c.id,
c.libelle as nom, sum(cs.amount) as amount"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
" WHERE cs.fk_type = c.id"
;
$sql
.
=
" WHERE cs.fk_type = c.id"
;
...
@@ -456,12 +456,12 @@ if ($modecompta == 'CREANCES-DETTES')
...
@@ -456,12 +456,12 @@ if ($modecompta == 'CREANCES-DETTES')
if
(
!
empty
(
$date_start
)
&&
!
empty
(
$date_end
))
if
(
!
empty
(
$date_start
)
&&
!
empty
(
$date_end
))
$sql
.
=
" AND cs.date_ech >= '"
.
$db
->
idate
(
$date_start
)
.
"' AND cs.date_ech <= '"
.
$db
->
idate
(
$date_end
)
.
"'"
;
$sql
.
=
" AND cs.date_ech >= '"
.
$db
->
idate
(
$date_start
)
.
"' AND cs.date_ech <= '"
.
$db
->
idate
(
$date_end
)
.
"'"
;
$sql
.
=
" AND cs.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND cs.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY c.libelle"
;
$sql
.
=
" GROUP BY c.libelle
, c.id
"
;
$sql
.
=
" ORDER BY c.libelle"
;
$sql
.
=
" ORDER BY c.libelle
, c.id
"
;
}
}
else
else
{
{
$sql
=
"SELECT c.libelle as nom, sum(p.amount) as amount"
;
$sql
=
"SELECT
c.id,
c.libelle as nom, sum(p.amount) as amount"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"c_chargesociales as c"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"chargesociales as cs"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"paiementcharge as p"
;
$sql
.
=
", "
.
MAIN_DB_PREFIX
.
"paiementcharge as p"
;
...
@@ -471,8 +471,8 @@ else
...
@@ -471,8 +471,8 @@ else
if
(
!
empty
(
$date_start
)
&&
!
empty
(
$date_end
))
if
(
!
empty
(
$date_start
)
&&
!
empty
(
$date_end
))
$sql
.
=
" AND p.datep >= '"
.
$db
->
idate
(
$date_start
)
.
"' AND p.datep <= '"
.
$db
->
idate
(
$date_end
)
.
"'"
;
$sql
.
=
" AND p.datep >= '"
.
$db
->
idate
(
$date_start
)
.
"' AND p.datep <= '"
.
$db
->
idate
(
$date_end
)
.
"'"
;
$sql
.
=
" AND cs.entity = "
.
$conf
->
entity
;
$sql
.
=
" AND cs.entity = "
.
$conf
->
entity
;
$sql
.
=
" GROUP BY c.libelle"
;
$sql
.
=
" GROUP BY c.libelle
, c.id
"
;
$sql
.
=
" ORDER BY c.libelle"
;
$sql
.
=
" ORDER BY c.libelle
, c.id
"
;
}
}
dol_syslog
(
"get social contributions deductible=1 sql="
.
$sql
);
dol_syslog
(
"get social contributions deductible=1 sql="
.
$sql
);
...
@@ -539,6 +539,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
...
@@ -539,6 +539,7 @@ if ($mysoc->tva_assuj == 'franchise') // Non assujeti
/*
/*
* VAT
* VAT
*/
*/
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"VAT"
)
.
'</td></tr>'
;
print
'<tr><td colspan="4">'
.
$langs
->
trans
(
"VAT"
)
.
'</td></tr>'
;
$subtotal_ht
=
0
;
$subtotal_ht
=
0
;
$subtotal_ttc
=
0
;
$subtotal_ttc
=
0
;
...
@@ -562,12 +563,15 @@ if ($modecompta == 'CREANCES-DETTES')
...
@@ -562,12 +563,15 @@ if ($modecompta == 'CREANCES-DETTES')
dol_syslog
(
"get vat to pay sql="
.
$sql
);
dol_syslog
(
"get vat to pay sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
$num
=
$db
->
num_rows
(
$result
);
$var
=
false
;
$var
=
false
;
$i
=
0
;
$i
=
0
;
if
(
$num
)
{
if
(
$num
)
while
(
$i
<
$num
)
{
{
while
(
$i
<
$num
)
{
$obj
=
$db
->
fetch_object
(
$result
);
$obj
=
$db
->
fetch_object
(
$result
);
$amount
-=
$obj
->
amount
;
$amount
-=
$obj
->
amount
;
...
@@ -604,12 +608,15 @@ if ($modecompta == 'CREANCES-DETTES')
...
@@ -604,12 +608,15 @@ if ($modecompta == 'CREANCES-DETTES')
dol_syslog
(
"get vat received back sql="
.
$sql
);
dol_syslog
(
"get vat received back sql="
.
$sql
);
$result
=
$db
->
query
(
$sql
);
$result
=
$db
->
query
(
$sql
);
if
(
$result
)
{
if
(
$result
)
{
$num
=
$db
->
num_rows
(
$result
);
$num
=
$db
->
num_rows
(
$result
);
$var
=
true
;
$var
=
true
;
$i
=
0
;
$i
=
0
;
if
(
$num
)
{
if
(
$num
)
while
(
$i
<
$num
)
{
{
while
(
$i
<
$num
)
{
$obj
=
$db
->
fetch_object
(
$result
);
$obj
=
$db
->
fetch_object
(
$result
);
$amount
+=
$obj
->
amount
;
$amount
+=
$obj
->
amount
;
...
@@ -632,7 +639,7 @@ if ($modecompta == 'CREANCES-DETTES')
...
@@ -632,7 +639,7 @@ if ($modecompta == 'CREANCES-DETTES')
}
}
else
else
{
{
//
T
VA re
e
ll
ement deja payee
// VA
T
re
a
ll
y already paid
$amount
=
0
;
$amount
=
0
;
$sql
=
"SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"
;
$sql
=
"SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"tva as t"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"tva as t"
;
...
@@ -673,7 +680,7 @@ else
...
@@ -673,7 +680,7 @@ else
print
"<td align=
\"
right
\"
>"
.
price
(
$amount
)
.
"</td>
\n
"
;
print
"<td align=
\"
right
\"
>"
.
price
(
$amount
)
.
"</td>
\n
"
;
print
"</tr>
\n
"
;
print
"</tr>
\n
"
;
//
T
VA re
cuperee
// VA
T
re
ally received
$amount
=
0
;
$amount
=
0
;
$sql
=
"SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"
;
$sql
=
"SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"tva as t"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"tva as t"
;
...
...
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