public $url = null;
public $email = null;
public $holdingid = null;
+ public $SIREN = null;
public $NAF_code = null;
public $AX_code = null;
protected function handle_editor()
{
- foreach (array('name', 'acronym', 'url', 'email', 'NAF_code', 'tel', 'fax', 'address') as $field) {
+ foreach (array('name', 'acronym', 'url', 'email', 'SIREN', 'NAF_code', 'tel', 'fax', 'address') as $field) {
$this->$field = (Env::t($field) == '' ? null : Env::t($field));
}
foreach (array('AX_code', 'holdingid') as $field) {
WHERE name = {?}',
$this->name);
if ($res->numRows() != 1) {
- XDB::execute('INSERT INTO profile_job_enum (name, acronym, url, email, holdingid, NAF_code, AX_code)
- VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?})',
+ XDB::execute('INSERT INTO profile_job_enum (name, acronym, url, email, holdingid, SIREN_code, NAF_code, AX_code)
+ VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?}, {?})',
$this->name, $this->acronym, $this->url, $this->email,
- $this->holdingid, $this->NAF_code, $this->AX_code);
+ $this->holdingid, $this->SIREN, $this->NAF_code, $this->AX_code);
$jobid = XDB::insertId();
$phone = new Phone(array('link_type' => 'hq', 'link_id' => $jobid, 'id' => 0,
} else {
XDB::execute('UPDATE profile_job_enum
SET name = {?}, acronym = {?}, url = {?}, email = {?},
- NAF_code = {?}, AX_code = {?}, holdingid = {?}
+ SIREN_code = {?}, NAF_code = {?}, AX_code = {?}, holdingid = {?}
WHERE id = {?}',
Env::t('name'), Env::t('acronym'), Env::t('url'), Env::t('email'),
+ (Env::t('SIREN') == 0 ? null : Env::t('SIREN')),
(Env::t('NAF_code') == 0 ? null : Env::t('NAF_code')),
(Env::i('AX_code') == 0 ? null : Env::t('AX_code')),
(Env::i('holdingId') == 0 ? null : Env::t('holdingId')), $id);
}
if (!Env::has('change') && $id != -1) {
- $res = XDB::query("SELECT e.id, e.name, e.acronym, e.url, e.email, e.NAF_code, e.AX_code,
+ $res = XDB::query("SELECT e.id, e.name, e.acronym, e.url, e.email, e.SIREN_code AS SIREN, e.NAF_code, e.AX_code,
h.id AS holdingId, h.name AS holdingName, h.acronym AS holdingAcronym,
t.display_tel AS tel, f.display_tel AS fax, a.text AS address
FROM profile_job_enum AS e
<td><input type="text" name="email" value="{$selectedJob.email}" /></td>
</tr>
<tr>
+ <td>Code SIREN</td>
+ <td><input type="text" name="SIREN" value="{$selectedJob.SIREN}" /></td>
+ </tr>
+ <tr>
<td>Code NAF</td>
<td><input type="text" name="NAF_code" value="{$selectedJob.NAF_code}" /></td>
</tr>
<input type="text" name="email" size="25" maxlength="255" value="{$valid->email}" /><br />
<strong>Holding :</strong>
<input type="text" name="holdingid" size="25" maxlength="200" value="{$valid->holdingid}" /><br />
+<strong>Code SIREN :</strong>
+<input type="text" name="SIREN" size="25" maxlength="200" value="{$valid->SIREN}" /><br />
<strong>Code NAF :</strong>
<input type="text" name="NAF_code" size="25" maxlength="200" value="{$valid->NAF_code}" /><br />
<strong>Code AX :</strong>
<td>{$valid->holdingid}</td>
</tr>
<tr class="pair">
+ <td class="titre">Code SIREN :</td>
+ <td>{$valid->SIREN}</td>
+</tr>
+<tr class="pair">
<td class="titre">Code NAF :</td>
<td>{$valid->NAF_code}</td>
</tr>
--- /dev/null
+ALTER TABLE profile_job_enum ADD SIREN_code CHAR(9) NULL DEFAULT NULL AFTER holdingid;