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
314069f1
Commit
314069f1
authored
8 years ago
by
Juanjo Menent
Browse files
Options
Downloads
Patches
Plain Diff
Qual: Remove unused function
parent
cd6c6f64
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/compta/paiement/cheque/class/remisecheque.class.php
+1
-42
1 addition, 42 deletions
htdocs/compta/paiement/cheque/class/remisecheque.class.php
with
1 addition
and
42 deletions
htdocs/compta/paiement/cheque/class/remisecheque.class.php
+
1
−
42
View file @
314069f1
...
...
@@ -344,8 +344,7 @@ class RemiseCheque extends CommonObject
$this
->
errno
=
0
;
$this
->
db
->
begin
();
//$numref=$this->getNextNumber();
$numref
=
$this
->
getNextNumRef
();
if
(
$this
->
errno
==
0
&&
$numref
)
...
...
@@ -394,46 +393,6 @@ class RemiseCheque extends CommonObject
}
}
/**
* Old module for cheque receipt numbering
*
* @return int Next ref of cheque
*/
function
getNextNumber
()
{
global
$conf
;
$num
=
0
;
// We use +0 to convert varchar to ref for mysql, use ::integer for postgres.
// We must found a generic solution (Use a $db->toint function ?)
$sql
=
"SELECT "
;
if
(
$this
->
db
->
type
==
'pgsql'
)
$sql
.
=
"MAX(ref::integer)"
;
else
$sql
.
=
"MAX(ref+0)"
;
$sql
.
=
" FROM "
.
MAIN_DB_PREFIX
.
"bordereau_cheque"
;
$sql
.
=
" WHERE entity = "
.
$conf
->
entity
;
$sql
.
=
" AND ref not like '(%'"
;
dol_syslog
(
"Remisecheque::getNextNumber"
,
LOG_DEBUG
);
$resql
=
$this
->
db
->
query
(
$sql
);
if
(
$resql
)
{
$row
=
$this
->
db
->
fetch_row
(
$resql
);
$num
=
$row
[
0
];
$this
->
db
->
free
(
$resql
);
}
else
{
$this
->
errno
=
-
1034
;
dol_syslog
(
"Remisecheque::Validate Erreur SELECT (
$this->errno
)"
,
LOG_ERR
);
}
$num
++
;
return
$num
;
}
/**
* Return next reference of cheque receipts not already used (or last reference)
* according to numbering module defined into constant FACTURE_ADDON
...
...
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