task #10500: Option to choose if professionnal id are unique.
This commit is contained in:
parent
27faba959a
commit
ffd1c17a26
@ -22,7 +22,7 @@
|
||||
* \file htdocs/admin/societe.php
|
||||
* \ingroup company
|
||||
* \brief Third party module setup page
|
||||
* \version $Id: societe.php,v 1.61 2011/07/31 22:23:23 eldy Exp $
|
||||
* \version $Id: societe.php,v 1.62 2011/08/16 16:49:24 simnandez Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@ -157,6 +157,20 @@ if ($_GET["action"] == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
//Activate ProfId
|
||||
if ($_GET["action"] == 'setprofid')
|
||||
{
|
||||
$idprof="SOCIETE_IDPROF".$_GET["value"]."_UNIQUE";
|
||||
if (dolibarr_set_const($db, $idprof,$_GET["status"],'chaine',0,'',$conf->entity) > 0)
|
||||
{
|
||||
Header("Location: ".$_SERVER["PHP_SELF"]);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@ -451,6 +465,72 @@ print '</table>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
//IDProf
|
||||
print_titre($langs->trans("CompanyIdProfChecker"));
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$profid[0][0]=$langs->trans("ProfId1");
|
||||
$profid[0][1]=$langs->transcountry('ProfId1' ,$mysoc->pays_code);
|
||||
$profid[1][0]=$langs->trans("ProfId2");
|
||||
$profid[1][1]=$langs->transcountry('ProfId2' ,$mysoc->pays_code);
|
||||
$profid[2][0]=$langs->trans("ProfId3");
|
||||
$profid[2][1]=$langs->transcountry('ProfId3' ,$mysoc->pays_code);
|
||||
$profid[3][0]=$langs->trans("ProfId4");
|
||||
$profid[3][1]=$langs->transcountry('ProfId4' ,$mysoc->pays_code);
|
||||
|
||||
$var = true;
|
||||
$i=0;
|
||||
|
||||
while ($i < sizeof($profid))
|
||||
{
|
||||
$var = !$var;
|
||||
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$profid[$i][0]."</td><td>\n";
|
||||
print $profid[$i][1];
|
||||
print '</td>';
|
||||
|
||||
switch($i)
|
||||
{
|
||||
case 0:
|
||||
$verif=(!$conf->global->SOCIETE_IDPROF1_UNIQUE?false:true);
|
||||
break;
|
||||
case 1:
|
||||
$verif=(!$conf->global->SOCIETE_IDPROF2_UNIQUE?false:true);
|
||||
break;
|
||||
case 2:
|
||||
$verif=(!$conf->global->SOCIETE_IDPROF3_UNIQUE?false:true);
|
||||
break;
|
||||
case 3:
|
||||
$verif=(!$conf->global->SOCIETE_IDPROF4_UNIQUE?false:true);
|
||||
break;
|
||||
}
|
||||
|
||||
if ($verif)
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofid&value='.($i+1).'&status=0">';
|
||||
print img_picto($langs->trans("Activated"),'switch_on');
|
||||
print '</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="center"><a href="'.$_SERVER['PHP_SELF'].'?action=setprofid&value='.($i+1).'&status=1">';
|
||||
print img_picto($langs->trans("Disabled"),'switch_off');
|
||||
print '</a></td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
|
||||
print_titre($langs->trans("Other"));
|
||||
|
||||
// Autres options
|
||||
@ -498,5 +578,5 @@ dol_fiche_end();
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:23 $ - $Revision: 1.61 $');
|
||||
llxFooter('$Date: 2011/08/16 16:49:24 $ - $Revision: 1.62 $');
|
||||
?>
|
||||
|
||||
@ -883,6 +883,7 @@ NotificationsDesc=La funció de les notificacions permet enviar automàticament
|
||||
ModelModules=Models de documents
|
||||
DocumentModelOdt=Generació des dels documents amb format OpenDocument (Arxiu .ODT OpenOffice, KOffice, TextEdit,...)
|
||||
WatermarkOnDraft=Marca d'aigua en els documents esborrany
|
||||
CompanyIdProfChecker=Id Professional únic
|
||||
##### Webcal setup #####
|
||||
WebCalSetup=Configuració d'enllaç amb el calendari webcalendar
|
||||
WebCalSyncro=Integrar els esdeveniments Dolibarr a webcalendar
|
||||
|
||||
@ -875,6 +875,7 @@ NotificationsDesc=EMails notifications feature allows you to silently send autom
|
||||
ModelModules=Documents templates
|
||||
DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT files for OpenOffice, KOffice, TextEdit,...)
|
||||
WatermarkOnDraft=Watermark on draft document
|
||||
CompanyIdProfChecker=Professional Id unique
|
||||
##### Webcal setup #####
|
||||
WebCalSetup=Webcalendar link setup
|
||||
WebCalSyncro=Add Dolibarr events to WebCalendar
|
||||
|
||||
@ -883,6 +883,7 @@ NotificationsDesc=La función de las notificaciones permite enviar automáticame
|
||||
ModelModules=Modelos de documentos
|
||||
DocumentModelOdt=Generación desde los documentos OpenDocument (Archivo .ODT OpenOffice, KOffice, TextEdit,...)
|
||||
WatermarkOnDraft=Marca de agua en los documentos borrador
|
||||
CompanyIdProfChecker=Id Profesional único
|
||||
##### Webcal setup #####
|
||||
WebCalSetup=Configuración de enlace con el calendario Webcalendar
|
||||
WebCalSyncro=Integrar los eventos Dolibarr en WebCalendar
|
||||
|
||||
@ -883,6 +883,7 @@ NotificationsDesc= La fonction des notifications par emails permet d'envoyer aut
|
||||
ModelModules=Modèle de documents
|
||||
DocumentModelOdt=Genération depuis des modèles OpenDocument (Fichier .ODT OpenOffice, KOffice, TextEdit...)
|
||||
WatermarkOnDraft=Filigrane sur les documents brouillons
|
||||
CompanyIdProfChecker=Id professionel unique
|
||||
##### Webcal setup #####
|
||||
WebCalSetup= Configuration du lien vers le calendrier Webcalendar
|
||||
WebCalSyncro= Intégrer les événements Dolibarr dans WebCalendar
|
||||
|
||||
Loading…
Reference in New Issue
Block a user