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
bc7aa90a
Commit
bc7aa90a
authored
19 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
MSynchro
parent
d6b8ce9a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/telephonie/script/facturation-details-tableur.php
+39
-11
39 additions, 11 deletions
htdocs/telephonie/script/facturation-details-tableur.php
with
39 additions
and
11 deletions
htdocs/telephonie/script/facturation-details-tableur.php
+
39
−
11
View file @
bc7aa90a
...
...
@@ -66,11 +66,11 @@ dolibarr_syslog("Mois $month Ann
if
(
!
$error
)
{
$sql
=
"SELECT
distinct(ligne) as clien
t"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_co
mmunications_details
"
;
$sql
.
=
"
ORDER BY ligne ASC
"
;
$sql
=
"SELECT
fk_contrat as contra
t"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_co
ntrat_service
"
;
$sql
.
=
"
WHERE fk_service = 3
"
;
$c
lien
ts
=
array
();
$c
ontra
ts
=
array
();
if
(
$db
->
query
(
$sql
)
)
{
...
...
@@ -82,7 +82,7 @@ if (!$error)
{
$objp
=
$db
->
fetch_object
(
$i
);
$c
lien
ts
[
$i
]
=
$objp
->
c
lien
t
;
$c
ontra
ts
[
$i
]
=
$objp
->
c
ontra
t
;
$i
++
;
}
...
...
@@ -102,17 +102,45 @@ if (!$error)
if
(
!
$error
)
{
foreach
(
$clients
as
$client
)
foreach
(
$contrats
as
$contrat
)
{
$sql
=
"SELECT rowid as ligne"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"telephonie_societe_ligne"
;
$sql
.
=
" WHERE fk_contrat = "
.
$contrat
;
$resql
=
$db
->
query
(
$sql
)
;
if
(
$resql
)
{
$num
=
$db
->
num_rows
(
$resql
);
$i
=
0
;
while
(
$i
<
$num
)
{
$obj
=
$db
->
fetch_object
(
$resql
);
$contrats
[
$i
]
=
$objp
->
contrat
;
$facdet
=
new
FactureDetailTableurOne
(
$db
);
$resg
=
$facdet
->
GenerateFile
(
$
client
,
$year
,
$month
);
$resg
=
$facdet
->
GenerateFile
(
$
obj
->
ligne
,
$year
,
$month
);
if
(
$resg
<>
0
)
{
dolibarr_syslog
(
"ERREUR lors de Gnration du dtail tableur"
);
$error
=
19
;
}
$i
++
;
}
$db
->
free
();
}
else
{
$error
=
1
;
dolibarr_syslog
(
$db
->
error
());
}
}
}
...
...
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