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
65951d2f
Commit
65951d2f
authored
8 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Plain Diff
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
parents
017b18d5
ce10dc61
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/core/modules/modSociete.class.php
+9
-6
9 additions, 6 deletions
htdocs/core/modules/modSociete.class.php
with
9 additions
and
6 deletions
htdocs/core/modules/modSociete.class.php
+
9
−
6
View file @
65951d2f
...
...
@@ -242,12 +242,12 @@ class modSociete extends DolibarrModules
$this
->
rights
[
$r
][
4
]
=
'contact'
;
$this
->
rights
[
$r
][
5
]
=
'export'
;
// Menus
//-------
$this
->
menu
=
1
;
// This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r
=
0
;
...
...
@@ -282,7 +282,7 @@ class modSociete extends DolibarrModules
$this
->
export_sql_end
[
$r
]
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'c_paiement as paymode ON s.mode_reglement = paymode.id'
;
$this
->
export_sql_end
[
$r
]
.
=
' WHERE s.entity IN ('
.
getEntity
(
'societe'
,
1
)
.
')'
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
)
$this
->
export_sql_end
[
$r
]
.
=
' AND sc.fk_user = '
.
$user
->
id
;
// Export list of contacts and attributes
$r
++
;
$this
->
export_code
[
$r
]
=
$this
->
rights_class
.
'_'
.
$r
;
...
...
@@ -300,9 +300,12 @@ class modSociete extends DolibarrModules
}
$keyforselect
=
'socpeople'
;
$keyforelement
=
'contact'
;
$keyforaliasextra
=
'extra'
;
include
DOL_DOCUMENT_ROOT
.
'/core/extrafieldsinexport.inc.php'
;
$keyforselect
=
'societe'
;
$keyforelement
=
'company'
;
$keyforaliasextra
=
'extrasoc'
;
include
DOL_DOCUMENT_ROOT
.
'/core/extrafieldsinexport.inc.php'
;
$this
->
export_sql_start
[
$r
]
=
'SELECT DISTINCT '
;
$this
->
export_sql_end
[
$r
]
=
' FROM '
.
MAIN_DB_PREFIX
.
'socpeople as c'
;
$this
->
export_sql_end
[
$r
]
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'societe as s ON c.fk_soc = s.rowid'
;
$this
->
export_sql_end
[
$r
]
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'societe_extrafields as extrasoc ON s.rowid = extrasoc.fk_object'
;
if
(
!
$user
->
rights
->
societe
->
client
->
voir
)
$this
->
export_sql_end
[
$r
]
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'societe_commerciaux as sc ON sc.fk_soc = s.rowid'
;
$this
->
export_sql_end
[
$r
]
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'c_departements as d ON c.fk_departement = d.rowid'
;
$this
->
export_sql_end
[
$r
]
.
=
' LEFT JOIN '
.
MAIN_DB_PREFIX
.
'c_country as co ON c.fk_pays = co.rowid'
;
...
...
@@ -402,7 +405,7 @@ class modSociete extends DolibarrModules
'sr.code_banque'
=>
"0000"
,
'sr.code_guichet'
=>
"1111"
,
'sr.number'
=>
"3333333333"
,
'sr.cle_rib'
=>
"22"
,
'sr.bic'
=>
"USHINGMMXXX"
,
'sr.iban_prefix'
=>
"US00 0000 1111 22 3333 3333"
);
// Import Company Salesman
$r
++
;
$this
->
import_code
[
$r
]
=
$this
->
rights_class
.
'_'
.
$r
;
...
...
@@ -411,7 +414,7 @@ class modSociete extends DolibarrModules
$this
->
import_entities_array
[
$r
]
=
array
(
'sr.fk_user'
=>
'user'
);
// We define here only fields that use another icon that the one defined into import_icon
$this
->
import_tables_array
[
$r
]
=
array
(
'sr'
=>
MAIN_DB_PREFIX
.
'societe_commerciaux'
);
$this
->
import_fields_array
[
$r
]
=
array
(
'sr.fk_soc'
=>
"ThirdPartyName*"
,
'sr.fk_user'
=>
"User*"
);
$this
->
import_convertvalue_array
[
$r
]
=
array
(
'sr.fk_soc'
=>
array
(
'rule'
=>
'fetchidfromref'
,
'classfile'
=>
'/societe/class/societe.class.php'
,
'class'
=>
'Societe'
,
'method'
=>
'fetch'
,
'element'
=>
'ThirdParty'
),
'sr.fk_user'
=>
array
(
'rule'
=>
'fetchidfromref'
,
'classfile'
=>
'/user/class/user.class.php'
,
'class'
=>
'User'
,
'method'
=>
'fetch'
,
'element'
=>
'User'
)
...
...
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