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
931617e6
Commit
931617e6
authored
20 years ago
by
Rodolphe Quiedeville
Browse files
Options
Downloads
Patches
Plain Diff
Nouveau fichier
parent
780b055c
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/includes/modules/facture/uranus/uranus.modules.php
+83
-0
83 additions, 0 deletions
htdocs/includes/modules/facture/uranus/uranus.modules.php
with
83 additions
and
0 deletions
htdocs/includes/modules/facture/uranus/uranus.modules.php
0 → 100644
+
83
−
0
View file @
931617e6
<?php
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see http://www.gnu.org/
*
* $Id$
* $Source$
*
*/
/*!
\file htdocs/includes/modules/facture/uranus/uranus.modules.php
\ingroup facture
\brief Fichier contenant la classe du modle de numrotation de rfrence de facture Uranus
\version $Revision$
*/
/*!
\class mod_facture_uranus
\brief Classe du modle de numrotation de rfrence de facture Uranus
*/
class
mod_facture_uranus
extends
ModeleNumRefFactures
{
/*! \brief Renvoi la description du modele de numrotation
* \return string Texte descripif
*/
function
info
()
{
return
"
Renvoie le numro de facture sous une forme numrique simple, prfix par l'anne sur un seul chiffre"
;
}
/*! \brief Renvoi un exemple de numrotation
* \return string Example
*/
function
getExample
()
{
return
"5000001"
;
}
/*! \brief Renvoie la rfrence de facture suivante non utilise
* \param objsoc Objet socit
* \return string Texte descripif
*/
function
getNumRef
(
$objsoc
=
0
)
{
global
$db
;
$y
=
substr
(
strftime
(
"%y"
,
time
()),
-
1
);
$sql
=
"SELECT count(*) FROM "
.
MAIN_DB_PREFIX
.
"facture"
;
$sql
.
=
" WHERE fk_statut > 0"
;
$sql
.
=
" AND facnumber LIKE '
$y
%'"
;
$sql
.
=
" AND CHAR_LENGTH(facnumber) = 7"
;
if
(
$db
->
query
(
$sql
)
)
{
$row
=
$db
->
fetch_row
(
0
);
$num
=
$row
[
0
]
+
1
;
}
return
"
$y
"
.
substr
(
"000000"
.
$num
,
-
6
);
}
}
?>
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