|
dolibarr
13.0.2
|
Ensemble de fonctions de base pour le module societe. More...
Go to the source code of this file.
Functions | |
| societe_prepare_head (Societe $object) | |
| Return array of tabs to used on pages for third parties cards. More... | |
| societe_prepare_head2 ($object) | |
| Return array of tabs to used on page. More... | |
| societe_admin_prepare_head () | |
| Return array head with list of tabs to view object informations. More... | |
| getCountry ($searchkey, $withcode= '', $dbtouse=0, $outputlangs= '', $entconv=1, $searchlabel= '') | |
| Return country label, code or id from an id, code or label. More... | |
| getState ($id, $withcode= '', $dbtouse=0, $withregion=0, $outputlangs= '', $entconv=1) | |
| Return state translated from an id. More... | |
| currency_name ($code_iso, $withcode= '', $outputlangs=null) | |
| Return label of currency or code+label. More... | |
| getFormeJuridiqueLabel ($code) | |
| Retourne le nom traduit de la forme juridique. More... | |
| getCountriesInEEC () | |
| Return list of countries that are inside the EEC (European Economic Community) Note: Try to keep this function as a "memory only" function for performance reasons. More... | |
| isInEEC ($object) | |
| Return if a country of an object is inside the EEC (European Economic Community) More... | |
| show_projects ($conf, $langs, $db, $object, $backtopage= '', $nocreatelink=0, $morehtmlright= '') | |
| Show html area for list of projects. More... | |
| show_contacts ($conf, $langs, $db, $object, $backtopage= '') | |
| Show html area for list of contacts. More... | |
| show_actions_todo ($conf, $langs, $db, $filterobj, $objcon= '', $noprint=0, $actioncode= '') | |
| Show html area with actions to do. More... | |
| show_actions_done ($conf, $langs, $db, $filterobj, $objcon= '', $noprint=0, $actioncode= '', $donetodo= 'done', $filters=array(), $sortfield= 'a.datep, a.id', $sortorder= 'DESC', $module= '') | |
| Show html area with actions (done or not, ignore the name of function). More... | |
| show_subsidiaries ($conf, $langs, $db, $object) | |
| Show html area for list of subsidiaries. More... | |
| addEventTypeSQL (&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDOR="AND") | |
| Add Event Type SQL. More... | |
| addMailingEventTypeSQL ($actioncode, $objcon, $filterobj) | |
| Add Mailing Event Type SQL. More... | |
Ensemble de fonctions de base pour le module societe.
Definition in file company.lib.php.
| addEventTypeSQL | ( | & | $sql, |
| $actioncode, | |||
| $donetodo, | |||
| $now, | |||
| $filters, | |||
$sqlANDOR = "AND" |
|||
| ) |
Add Event Type SQL.
| string | $sql | $sql modified |
| string | $actioncode | Action code |
| string | $donetodo | donetodo |
| string | $now | now |
| string | $filters | array |
| string | $sqlANDOR | "AND", "OR" or "" sql condition |
Definition at line 1796 of file company.lib.php.
References natural_search().
Referenced by show_actions_done().
| addMailingEventTypeSQL | ( | $actioncode, | |
| $objcon, | |||
| $filterobj | |||
| ) |
Add Mailing Event Type SQL.
| string | $actioncode | Action code |
| Object | $objcon | objcon |
| Object | $filterobj | filterobj |
Definition at line 1830 of file company.lib.php.
Referenced by show_actions_done().
| currency_name | ( | $code_iso, | |
$withcode = '', |
|||
$outputlangs = null |
|||
| ) |
Return label of currency or code+label.
| string | $code_iso | Code iso of currency |
| int | $withcode | '1'=show code + label |
| Translate | $outputlangs | Output language |
Definition at line 528 of file company.lib.php.
References $resql.
Referenced by Form\form_multicurrency_code().
| getCountriesInEEC | ( | ) |
Return list of countries that are inside the EEC (European Economic Community) Note: Try to keep this function as a "memory only" function for performance reasons.
Definition at line 598 of file company.lib.php.
Referenced by isInEEC().
| getCountry | ( | $searchkey, | |
$withcode = '', |
|||
$dbtouse = 0, |
|||
$outputlangs = '', |
|||
$entconv = 1, |
|||
$searchlabel = '' |
|||
| ) |
Return country label, code or id from an id, code or label.
| int | $searchkey | Id or code of country to search |
| string | $withcode | '0'=Return label, '1'=Return code + label, '2'=Return code from id, '3'=Return id from code, 'all'=Return array('id'=>,'code'=>,'label'=>) |
| DoliDB | $dbtouse | Database handler (using in global way may fail because of conflicts with some autoload features) |
| Translate | $outputlangs | Langs object for output translation |
| int | $entconv | 0=Return value without entities and not converted to output charset, 1=Ready for html output |
| int | $searchlabel | Label of country to search (warning: searching on label is not reliable) |
Definition at line 407 of file company.lib.php.
References $resql, and dol_print_error().
Referenced by ActionsCardCommon\assign_post(), createProductOrService(), createThirdParty(), AccountancyExport\exportLDCompta10(), Entrepot\fetch(), Product\fetch(), CommonObject\getFullAddress(), Societe\setMysoc(), show_contacts(), updateContact(), updateProductOrService(), updateThirdParty(), pdf_standard_myobject\write_file(), pdf_standard_recruitmentjobposition\write_file(), pdf_sponge\write_file(), and pdf_crabe\write_file().
| getFormeJuridiqueLabel | ( | $code | ) |
Retourne le nom traduit de la forme juridique.
| string | $code | Code de la forme juridique |
Definition at line 567 of file company.lib.php.
References $resql, and dol_syslog().
Referenced by CommonDocGenerator\get_substitutionarray_mysoc(), html_print_stripe_footer(), and pdf_pagefoot().
| getState | ( | $id, | |
$withcode = '', |
|||
$dbtouse = 0, |
|||
$withregion = 0, |
|||
$outputlangs = '', |
|||
$entconv = 1 |
|||
| ) |
Return state translated from an id.
Return value is always utf8 encoded and without entities.
| int | $id | id of state (province/departement) |
| int | $withcode | '0'=Return label, '1'=Return string code + label, '2'=Return code, 'all'=return array('id'=>,'code'=>,'label'=>) |
| DoliDB | $dbtouse | Database handler (using in global way may fail because of conflicts with some autoload features) |
| int | $withregion | '0'=Ignores region, '1'=Add region name/code/id as needed to output, |
| Translate | $outputlangs | Langs object for output translation, not fully implemented yet |
| int | $entconv | 0=Return value without entities and not converted to output charset, 1=Ready for html output |
Definition at line 465 of file company.lib.php.
References $resql, dol_print_error(), and dol_syslog().
Referenced by CommonDocGenerator\get_substitutionarray_contact(), CommonDocGenerator\get_substitutionarray_mysoc(), CommonDocGenerator\get_substitutionarray_thirdparty(), CommonObject\getFullAddress(), pdf_build_address(), and Societe\setMysoc().
| isInEEC | ( | $object | ) |
Return if a country of an object is inside the EEC (European Economic Community)
| Object | $object | Object |
Definition at line 654 of file company.lib.php.
References getCountriesInEEC().
Referenced by Stripe\customerStripe(), get_default_tva(), Form\load_tva(), and InterfaceStripe\runTrigger().
| show_actions_done | ( | $conf, | |
| $langs, | |||
| $db, | |||
| $filterobj, | |||
$objcon = '', |
|||
$noprint = 0, |
|||
$actioncode = '', |
|||
$donetodo = 'done', |
|||
$filters = array(), |
|||
$sortfield = 'a.datep, |
|||
| a.id' | , | ||
$sortorder = 'DESC', |
|||
$module = '' |
|||
| ) |
Show html area with actions (done or not, ignore the name of function).
Note: Global parameter $param must be defined.
| Conf | $conf | Object conf |
| Translate | $langs | Object langs |
| DoliDB | $db | Object db |
| mixed | $filterobj | Filter on object Adherent|Societe|Project|Product|CommandeFournisseur|Dolresource|Ticket... to list events linked to an object |
| Contact | $objcon | Filter on object contact to filter events on a contact |
| int | $noprint | Return string but does not output it |
| string | $actioncode | Filter on actioncode |
| string | $donetodo | Filter on event 'done' or 'todo' or ''=nofilter (all). |
| array | $filters | Filter on other fields |
| string | $sortfield | Sort field |
| string | $sortorder | Sort order |
| string | $module | You can add module name here if elementtype in table llx_actioncomm is objectkey |
Definition at line 1203 of file company.lib.php.
References $_SERVER, $formactions, $resql, addEventTypeSQL(), addMailingEventTypeSQL(), dol_getdate(), dol_include_once(), dol_mktime(), dol_now(), dol_print_date(), dol_print_error(), dol_syslog(), dol_trunc(), dolGetElementUrl(), GETPOST(), getTitleFieldOfList(), img_object(), img_picto(), img_warning(), print, and setEventMessage().
Referenced by ActionsContactCardDefault\assign_values(), ActionsAdherentCardDefault\assign_values(), and show_actions_todo().
| show_actions_todo | ( | $conf, | |
| $langs, | |||
| $db, | |||
| $filterobj, | |||
$objcon = '', |
|||
$noprint = 0, |
|||
$actioncode = '' |
|||
| ) |
Show html area with actions to do.
| Conf | $conf | Object conf |
| Translate | $langs | Object langs |
| DoliDB | $db | Object db |
| Adherent | Societe | $filterobj | Object thirdparty or member |
| Contact | $objcon | Object contact |
| int | $noprint | Return string but does not output it |
| int | $actioncode | Filter on actioncode |
Definition at line 1175 of file company.lib.php.
References print, and show_actions_done().
Referenced by ActionsContactCardDefault\assign_values(), and ActionsAdherentCardDefault\assign_values().
| show_contacts | ( | $conf, | |
| $langs, | |||
| $db, | |||
| $object, | |||
$backtopage = '' |
|||
| ) |
Show html area for list of contacts.
| Conf | $conf | Object conf |
| Translate | $langs | Object langs |
| DoliDB | $db | Database handler |
| Societe | $object | Third party object |
| string | $backtopage | Url to go once contact is created |
Definition at line 795 of file company.lib.php.
References $_SERVER, dol_escape_htmltag(), dol_print_error(), dol_sort_array(), dol_syslog(), dolGetButtonTitle(), getArrayOfSocialNetworks(), getCountry(), GETPOST(), GETPOSTISSET(), getTitleFieldOfList(), img_edit(), img_object(), load_fiche_titre(), natural_search(), print, and setEventMessages().
| show_projects | ( | $conf, | |
| $langs, | |||
| $db, | |||
| $object, | |||
$backtopage = '', |
|||
$nocreatelink = 0, |
|||
$morehtmlright = '' |
|||
| ) |
Show html area for list of projects.
| Conf | $conf | Object conf |
| Translate | $langs | Object langs |
| DoliDB | $db | Database handler |
| Object | $object | Third party object |
| string | $backtopage | Url to go once contact is created |
| int | $nocreatelink | 1=Hide create project link |
| string | $morehtmlright | More html on right of title |
Definition at line 677 of file company.lib.php.
References dol_print_error(), dolGetButtonTitle(), load_fiche_titre(), price(), and print.
| show_subsidiaries | ( | $conf, | |
| $langs, | |||
| $db, | |||
| $object | |||
| ) |
Show html area for list of subsidiaries.
| Conf | $conf | Object conf |
| Translate | $langs | Object langs |
| DoliDB | $db | Database handler |
| Societe | $object | Third party object |
Definition at line 1714 of file company.lib.php.
References img_edit(), load_fiche_titre(), and print.
| societe_admin_prepare_head | ( | ) |
Return array head with list of tabs to view object informations.
Definition at line 357 of file company.lib.php.
References complete_head_from_modules().
| societe_prepare_head | ( | Societe | $object | ) |
Return array of tabs to used on pages for third parties cards.
| Societe | $object | Object company shown |
Definition at line 42 of file company.lib.php.
References $resql, complete_head_from_modules(), Link\count(), dol_dir_list(), dol_print_error(), GETPOST(), and CommonObject\liste_contact().
Referenced by ActionsCardCommon\assign_values().
| societe_prepare_head2 | ( | $object | ) |
Return array of tabs to used on page.
| Object | $object | Object for tabs |
Definition at line 331 of file company.lib.php.