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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
2ea124d3
Commit
2ea124d3
authored
Sep 2, 2010
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Canvas usage is an option
parent
3956d590
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/societe/soc.php
+11
-10
11 additions, 10 deletions
htdocs/societe/soc.php
with
11 additions
and
10 deletions
htdocs/societe/soc.php
+
11
−
10
View file @
2ea124d3
...
@@ -51,8 +51,17 @@ if ($user->societe_id) $socid=$user->societe_id;
...
@@ -51,8 +51,17 @@ if ($user->societe_id) $socid=$user->societe_id;
$result
=
restrictedArea
(
$user
,
'societe'
,
$socid
);
$result
=
restrictedArea
(
$user
,
'societe'
,
$socid
);
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
$socstatic
=
new
Societe
(
$db
);
if
(
!
empty
(
$socid
))
$socstatic
->
getCanvas
(
$socid
);
$canvas
=
(
!
empty
(
$socstatic
->
canvas
)
?
$socstatic
->
canvas
:
GETPOST
(
"canvas"
));
if
(
!
GETPOST
(
"canvas"
))
// If canvas is defined, because on url, or because company was created with canvas feature on,
// we use the canvas feature.
// If canvas is not defined, we use standard feature.
if
(
empty
(
$canvas
))
{
{
// -----------------------------------------
// -----------------------------------------
// When used in standard mode
// When used in standard mode
...
@@ -61,7 +70,6 @@ if (! GETPOST("canvas"))
...
@@ -61,7 +70,6 @@ if (! GETPOST("canvas"))
// Initialization Company Object
// Initialization Company Object
$soc
=
new
Societe
(
$db
);
$soc
=
new
Societe
(
$db
);
/*
/*
* Actions
* Actions
*/
*/
...
@@ -1579,16 +1587,9 @@ else
...
@@ -1579,16 +1587,9 @@ else
// When used with CANVAS
// When used with CANVAS
// -----------------------------------------
// -----------------------------------------
$_GET
[
"canvas"
]
=
'default'
;
//
$_GET["canvas"] = 'default';
//if ($_REQUEST["private"]==1) $_GET["canvas"] = 'individual'; To switch to other canvas, we must use another value for canvas
//if ($_REQUEST["private"]==1) $_GET["canvas"] = 'individual'; To switch to other canvas, we must use another value for canvas
// Get object canvas
$socstatic
=
new
Societe
(
$db
);
if
(
!
empty
(
$socid
))
$socstatic
->
getCanvas
(
$socid
);
// Initialization Company Canvas
$canvas
=
(
!
empty
(
$socstatic
->
canvas
)
?
$socstatic
->
canvas
:
GETPOST
(
"canvas"
));
$soccanvas
=
new
Canvas
(
$db
);
$soccanvas
=
new
Canvas
(
$db
);
$soccanvas
->
load_canvas
(
'thirdparty@societe'
,
$canvas
);
$soccanvas
->
load_canvas
(
'thirdparty@societe'
,
$canvas
);
...
...
...
...
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