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
3b6048a0
Commit
3b6048a0
authored
15 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Use numbering module to suggest new ref
parent
77ac9bb2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
htdocs/comm/addpropal.php
+15
-11
15 additions, 11 deletions
htdocs/comm/addpropal.php
htdocs/projet/fiche.php
+20
-5
20 additions, 5 deletions
htdocs/projet/fiche.php
with
35 additions
and
16 deletions
htdocs/comm/addpropal.php
+
15
−
11
View file @
3b6048a0
<?php
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-200
8
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-20
1
0 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
*
...
...
@@ -20,19 +20,15 @@
*/
/**
\file htdocs/comm/addpropal.php
\ingroup propal
\brief Page
d'ajout d'une proposition
comm
m
ercial
\version $Id$
*
\file htdocs/comm/addpropal.php
*
\ingroup propal
*
\brief Page
to add a new
commercial
proposal
*
\version $Id$
*/
require
(
"./pre.inc.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
'/propal.class.php'
);
require_once
(
DOL_DOCUMENT_ROOT
.
'/includes/modules/propale/modules_propale.php'
);
if
(
!
empty
(
$conf
->
global
->
PROPALE_ADDON
)
&&
is_readable
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/propale/"
.
$conf
->
global
->
PROPALE_ADDON
.
".php"
))
{
require_once
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/propale/"
.
$conf
->
global
->
PROPALE_ADDON
.
".php"
);
}
if
(
$conf
->
projet
->
enabled
)
require_once
(
DOL_DOCUMENT_ROOT
.
'/lib/project.lib.php'
);
$langs
->
load
(
"propal"
);
...
...
@@ -76,9 +72,17 @@ if ($_GET["action"] == 'create')
$propal
=
new
Propal
(
$db
);
$propal
->
date
=
time
();
$numpr
=
''
;
$obj
=
$conf
->
global
->
PROPALE_ADDON
;
$modPropale
=
new
$obj
;
$numpr
=
$modPropale
->
getNextValue
(
$soc
,
$propal
);
if
(
$obj
)
{
if
(
!
empty
(
$conf
->
global
->
PROPALE_ADDON
)
&&
is_readable
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/propale/"
.
$conf
->
global
->
PROPALE_ADDON
.
".php"
))
{
require_once
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/propale/"
.
$conf
->
global
->
PROPALE_ADDON
.
".php"
);
$modPropale
=
new
$obj
;
$numpr
=
$modPropale
->
getNextValue
(
$soc
,
$propal
);
}
}
// Fix pour modele numerotation qui deconne
// Si numero deja pris (ne devrait pas arriver), on incremente par .num+1
...
...
This diff is collapsed.
Click to expand it.
htdocs/projet/fiche.php
+
20
−
5
View file @
3b6048a0
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-200
9
Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-20
1
0 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -28,6 +28,7 @@
require
(
"./pre.inc.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
"/html.formfile.class.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/project/modules_project.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
"/projet/project.class.php"
);
require_once
(
DOL_DOCUMENT_ROOT
.
"/lib/project.lib.php"
);
$langs
->
load
(
"projects"
);
...
...
@@ -72,7 +73,7 @@ if ($_POST["action"] == 'add' && $user->rights->projet->creer)
if
(
!
$error
)
{
$project
=
new
Project
(
$db
);
$project
->
ref
=
$_POST
[
"ref"
];
$project
->
title
=
$_POST
[
"title"
];
$project
->
socid
=
$_POST
[
"socid"
];
...
...
@@ -243,8 +244,22 @@ if ($_GET["action"] == 'create' && $user->rights->projet->creer)
print
'<table class="border" width="100%">'
;
print
'<input type="hidden" name="action" value="add">'
;
$project
=
new
Project
(
$db
);
$defaultref
=
''
;
$obj
=
$conf
->
global
->
PROJECT_ADDON
;
if
(
$obj
)
{
if
(
!
empty
(
$conf
->
global
->
PROJECT_ADDON
)
&&
is_readable
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/project/"
.
$conf
->
global
->
PROJECT_ADDON
.
".php"
))
{
require_once
(
DOL_DOCUMENT_ROOT
.
"/includes/modules/project/"
.
$conf
->
global
->
PROJECT_ADDON
.
".php"
);
$modProject
=
new
$obj
;
$defaultref
=
$modProject
->
getNextValue
(
$soc
,
$project
);
}
}
// Ref
print
'<tr><td>'
.
$langs
->
trans
(
"Ref"
)
.
'*</td><td><input size="8" type="text" name="ref" value="'
.
$_POST
[
"ref"
]
.
'"></td></tr>'
;
print
'<tr><td>'
.
$langs
->
trans
(
"Ref"
)
.
'*</td><td><input size="8" type="text" name="ref" value="'
.
(
$_POST
[
"ref"
]
?
$_POST
[
"ref"
]
:
$defaultref
)
.
'"></td></tr>'
;
// Label
print
'<tr><td>'
.
$langs
->
trans
(
"Label"
)
.
'*</td><td><input size="30" type="text" name="title" value="'
.
$_POST
[
"title"
]
.
'"></td></tr>'
;
...
...
@@ -450,7 +465,7 @@ else
print
"</div>"
;
print
"<br>
\n
"
;
if
(
$_GET
[
'action'
]
!=
'presend'
)
{
print
'<table width="100%"><tr><td width="50%" valign="top">'
;
...
...
@@ -513,7 +528,7 @@ else
print
'</td></tr></table>'
;
}
}
...
...
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