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
435737da
Commit
435737da
authored
Nov 9, 2007
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Ajout de logs
parent
9b32220d
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
htdocs/compta/paiement/cheque/fiche.php
+1
-1
1 addition, 1 deletion
htdocs/compta/paiement/cheque/fiche.php
htdocs/compta/paiement/cheque/remisecheque.class.php
+64
-63
64 additions, 63 deletions
htdocs/compta/paiement/cheque/remisecheque.class.php
with
65 additions
and
64 deletions
htdocs/compta/paiement/cheque/fiche.php
+
1
−
1
View file @
435737da
...
...
@@ -326,7 +326,7 @@ else
$param
=
"&id="
.
$remisecheque
->
id
;
print
'<tr class="liste_titre">'
;
'<td>'
.
$langs
->
trans
(
"Num"
)
.
'</td>'
;
print
'<td>
</td>'
;
print
'<td>
'
.
$langs
->
trans
(
"Position"
)
.
'
</td>'
;
print_liste_field_titre
(
$langs
->
trans
(
"Num"
),
$_SERVER
[
"PHP_SELF"
],
"b.num_chq"
,
""
,
$param
,
'align="center"'
,
$sortfield
);
print_liste_field_titre
(
$langs
->
trans
(
"CheckTransmitter"
),
$_SERVER
[
"PHP_SELF"
],
"b.emetteur"
,
""
,
$param
,
""
,
$sortfield
);
print_liste_field_titre
(
$langs
->
trans
(
"Bank"
),
$_SERVER
[
"PHP_SELF"
],
"b.banque"
,
""
,
$param
,
""
,
$sortfield
);
...
...
This diff is collapsed.
Click to expand it.
htdocs/compta/paiement/cheque/remisecheque.class.php
+
64
−
63
View file @
435737da
...
...
@@ -56,8 +56,8 @@ class RemiseCheque
}
/**
\brief
Lecture
\param id
i
dentifiant de ligne
\brief
Load record
\param
id
I
dentifiant de ligne
*/
function
Fetch
(
$id
)
{
...
...
@@ -68,8 +68,8 @@ class RemiseCheque
$sql
.
=
" LEFT JOIN "
.
MAIN_DB_PREFIX
.
"bank_account as ba ON bc.fk_bank_account = ba.rowid"
;
$sql
.
=
" WHERE bc.rowid =
$id
;"
;
dolibarr_syslog
(
"RemiseCheque::fetch sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
{
if
(
$obj
=
$this
->
db
->
fetch_object
(
$resql
)
)
...
...
@@ -101,8 +101,6 @@ class RemiseCheque
{
return
-
1
;
}
}
/**
...
...
@@ -121,41 +119,43 @@ class RemiseCheque
$sql
=
"INSERT INTO "
.
MAIN_DB_PREFIX
.
"bordereau_cheque (datec, date_bordereau,fk_user_author,fk_bank_account)"
;
$sql
.
=
" VALUES (now(),now(),"
.
$user
->
id
.
","
.
$account_id
.
")"
;
dolibarr_syslog
(
"RemiseCheque::Create sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
{
$this
->
id
=
$this
->
db
->
last_insert_id
(
MAIN_DB_PREFIX
.
"bordereau_cheque"
);
if
(
$this
->
id
==
0
)
{
$this
->
errno
=
-
1024
;
dolibarr_syslog
(
"Remisecheque::Create Erreur Lecture ID (
$this->errno
)"
);
dolibarr_syslog
(
"Remisecheque::Create Erreur Lecture ID (
$this->errno
)"
,
LOG_ERR
);
}
if
(
$this
->
id
>
0
&&
$this
->
errno
==
=
0
)
if
(
$this
->
id
>
0
&&
$this
->
errno
==
0
)
{
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"bordereau_cheque"
;
$sql
.
=
" SET number='(PROV"
.
$this
->
id
.
")'"
;
$sql
.
=
" WHERE rowid='"
.
$this
->
id
.
"';"
;
dolibarr_syslog
(
"RemiseCheque::Create sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
!
$resql
)
{
$this
->
errno
=
-
1025
;
dolibarr_syslog
(
"RemiseCheque::Create ERREUR UPDATE (
$this->errno
)"
);
dolibarr_syslog
(
"RemiseCheque::Create ERREUR UPDATE (
$this->errno
)"
,
LOG_ERR
);
}
}
if
(
$this
->
id
>
0
&&
$this
->
errno
==
=
0
)
if
(
$this
->
id
>
0
&&
$this
->
errno
==
0
)
{
$lines
=
array
();
$sql
=
"SELECT b.rowid"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"bank as b"
;
$sql
.
=
" WHERE b.fk_type = 'CHQ' AND b.amount > 0"
;
$sql
.
=
" AND b.fk_bordereau = 0 AND b.fk_account='
$account_id
'"
;
$sql
.
=
" LIMIT 40
;
"
;
// On limite a 40 pour ne gnrer des PDF que d'une page
$sql
.
=
" AND b.fk_bordereau = 0 AND b.fk_account='
"
.
$account_id
.
"
'"
;
$sql
.
=
" LIMIT 40"
;
// On limite a 40 pour ne gnrer des PDF que d'une page
dolibarr_syslog
(
"RemiseCheque::Create sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
{
while
(
$row
=
$this
->
db
->
fetch_row
(
$resql
)
)
...
...
@@ -167,28 +167,29 @@ class RemiseCheque
else
{
$this
->
errno
=
-
1026
;
dolibarr_syslog
(
"RemiseCheque::Create E
RREUR SELECT
(
$this->errno
)"
);
dolibarr_syslog
(
"RemiseCheque::Create E
rror
(
$this->errno
)"
,
LOG_ERR
);
}
}
if
(
$this
->
id
>
0
&&
$this
->
errno
==
=
0
)
if
(
$this
->
id
>
0
&&
$this
->
errno
==
0
)
{
foreach
(
$lines
as
$lineid
)
{
$sql
=
"UPDATE "
.
MAIN_DB_PREFIX
.
"bank as b"
;
$sql
.
=
" SET fk_bordereau = "
.
$this
->
id
;
$sql
.
=
" WHERE b.rowid =
$lineid
;
"
;
$sql
.
=
" WHERE b.rowid =
"
.
$lineid
;
dolibarr_syslog
(
"RemiseCheque::Create sql="
.
$sql
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
!
$resql
)
{
$this
->
errno
=
-
18
;
dolibarr_syslog
(
"RemiseCheque::Create E
RREUR UPDATE
(
$this->errno
)"
);
dolibarr_syslog
(
"RemiseCheque::Create E
rror update bank
(
$this->errno
)"
,
LOG_ERR
);
}
}
}
if
(
$this
->
id
>
0
&&
$this
->
errno
==
=
0
)
if
(
$this
->
id
>
0
&&
$this
->
errno
==
0
)
{
if
(
$this
->
UpdateAmount
()
<>
0
)
{
...
...
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