mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Fix: utf-8
Todo: Monaco, Norway and Switzerland used vat rules of EEE ?
This commit is contained in:
@@ -1,13 +1,9 @@
|
|||||||
#Tue Jul 28 19:24:41 CEST 2009
|
#Fri Jul 31 00:34:31 CEST 2009
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
encoding//dev/initdemo/initdemo.sql=UTF-8
|
encoding//dev/initdemo/initdemo.sql=UTF-8
|
||||||
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
encoding//dev/skeletons/modMyModule.class.php=ISO-8859-1
|
||||||
encoding//htdocs/about.php=ISO-8859-1
|
encoding//htdocs/about.php=ISO-8859-1
|
||||||
encoding//htdocs/adherents/adherent.class.php=ISO-8859-1
|
encoding//htdocs/adherents/adherent.class.php=ISO-8859-1
|
||||||
encoding//htdocs/admin/adherent.php=ISO-8859-1
|
|
||||||
encoding//htdocs/admin/company.php=ISO-8859-1
|
|
||||||
encoding//htdocs/admin/fckeditor.php=ISO-8859-1
|
|
||||||
encoding//htdocs/admin/index.php=UTF-8
|
|
||||||
encoding//htdocs/admin/menus/index.php=ISO-8859-1
|
encoding//htdocs/admin/menus/index.php=ISO-8859-1
|
||||||
encoding//htdocs/admin/security.php=ISO-8859-1
|
encoding//htdocs/admin/security.php=ISO-8859-1
|
||||||
encoding//htdocs/admin/system/database-tables-contraintes.php=ISO-8859-1
|
encoding//htdocs/admin/system/database-tables-contraintes.php=ISO-8859-1
|
||||||
@@ -626,12 +622,7 @@ encoding//htdocs/product/templates/livrecontrat/livrecontrat-edit.tpl=UTF-8
|
|||||||
encoding//htdocs/product/templates/livrecontrat/livrecontrat-view.tpl=UTF-8
|
encoding//htdocs/product/templates/livrecontrat/livrecontrat-view.tpl=UTF-8
|
||||||
encoding//htdocs/product/templates/livrecouverture/livrecouverture-edit.tpl=UTF-8
|
encoding//htdocs/product/templates/livrecouverture/livrecouverture-edit.tpl=UTF-8
|
||||||
encoding//htdocs/product/templates/livrecouverture/livrecouverture-view.tpl=UTF-8
|
encoding//htdocs/product/templates/livrecouverture/livrecouverture-view.tpl=UTF-8
|
||||||
encoding//htdocs/product/fiche.php=ISO-8859-1
|
|
||||||
encoding//htdocs/product/reassort.php=ISO-8859-1
|
|
||||||
encoding//htdocs/product/stats/fiche.php=ISO-8859-1
|
|
||||||
encoding//htdocs/projet/tasks/fiche.php=ISO-8859-1
|
encoding//htdocs/projet/tasks/fiche.php=ISO-8859-1
|
||||||
encoding//htdocs/soc.php=ISO-8859-1
|
|
||||||
encoding//htdocs/societe.class.php=ISO-8859-1
|
|
||||||
encoding//htdocs/societe/ajaxcompanies.php=ISO-8859-1
|
encoding//htdocs/societe/ajaxcompanies.php=ISO-8859-1
|
||||||
encoding//htdocs/stats.class.php=ISO-8859-1
|
encoding//htdocs/stats.class.php=ISO-8859-1
|
||||||
encoding//htdocs/theme/auguria/auguria.css.php=ISO-8859-1
|
encoding//htdocs/theme/auguria/auguria.css.php=ISO-8859-1
|
||||||
|
|||||||
@@ -230,111 +230,106 @@ $constantes=array(
|
|||||||
'ADHERENT_CARD_FOOTER_TEXT',
|
'ADHERENT_CARD_FOOTER_TEXT',
|
||||||
'ADHERENT_ETIQUETTE_TYPE'
|
'ADHERENT_ETIQUETTE_TYPE'
|
||||||
);
|
);
|
||||||
print_fiche_titre($langs->trans("Other"),'','');
|
print_fiche_titre($langs->trans("Other"),'','');
|
||||||
|
|
||||||
print $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
print $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||||
print '%DOL_MAIN_URL_ROOT%, %ID%, %PRENOM%, %NOM%, %LOGIN%, %PASSWORD%,';
|
print '%DOL_MAIN_URL_ROOT%, %ID%, %PRENOM%, %NOM%, %LOGIN%, %PASSWORD%,';
|
||||||
print '%SOCIETE%, %ADRESSE%, %CP%, %VILLE%, %PAYS%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%,';
|
print '%SOCIETE%, %ADRESSE%, %CP%, %VILLE%, %PAYS%, %EMAIL%, %NAISS%, %PHOTO%, %TYPE%,';
|
||||||
//print '%INFOS%'; Deprecated
|
//print '%INFOS%'; Deprecated
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
form_constantes($constantes);
|
form_constantes($constantes);
|
||||||
|
|
||||||
|
$db->close();
|
||||||
|
|
||||||
$db->close();
|
print '<br>';
|
||||||
|
|
||||||
print '<br>';
|
llxFooter('$Date$ - $Revision$');
|
||||||
|
|
||||||
|
function form_constantes($tableau)
|
||||||
|
{
|
||||||
|
global $db,$bc,$langs;
|
||||||
|
|
||||||
|
$form = new Form($db);
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
print '<table class="noborder" width="100%">';
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td>'.$langs->trans("Description").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Value").'</td>';
|
||||||
|
print '<td>'.$langs->trans("Type").'</td>';
|
||||||
|
print '<td align="center" width="80">'.$langs->trans("Action").'</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
$var=true;
|
||||||
|
|
||||||
|
foreach($tableau as $const)
|
||||||
function form_constantes($tableau)
|
{
|
||||||
|
$sql = "SELECT rowid, name, value, type, note FROM ".MAIN_DB_PREFIX."const WHERE name='".$const."'";
|
||||||
|
$result = $db->query($sql);
|
||||||
|
if ($result)
|
||||||
{
|
{
|
||||||
// Variables globales
|
$obj = $db->fetch_object($result);
|
||||||
global $db,$bc,$langs;
|
$var=!$var;
|
||||||
$form = new Form($db);
|
print '<form action="adherent.php" method="POST">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<tr class="liste_titre">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<td>'.$langs->trans("Description").'</td>';
|
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||||
print '<td>'.$langs->trans("Value").'</td>';
|
print '<input type="hidden" name="constname" value="'.$obj->name.'">';
|
||||||
print '<td>'.$langs->trans("Type").'</td>';
|
print '<input type="hidden" name="constnote" value="'.nl2br($obj->note).'">';
|
||||||
print '<td align="center" width="80">'.$langs->trans("Action").'</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
$var=true;
|
|
||||||
|
|
||||||
foreach($tableau as $const)
|
print "<tr $bc[$var]>";
|
||||||
|
|
||||||
|
// Affiche nom constante
|
||||||
|
print '<td>';
|
||||||
|
print $langs->trans("Desc".$const) != ("Desc".$const) ? $langs->trans("Desc".$const) : $obj->note;
|
||||||
|
print "</td>\n";
|
||||||
|
|
||||||
|
if ($const == 'ADHERENT_ETIQUETTE_TYPE')
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, name, value, type, note FROM ".MAIN_DB_PREFIX."const WHERE name='".$const."'";
|
print '<td>';
|
||||||
$result = $db->query($sql);
|
// List of possible labels. Values must exists in
|
||||||
if ($result)
|
// file htdocs/adherents/PDF_Card.class.php
|
||||||
{
|
require_once(DOL_DOCUMENT_ROOT.'/includes/modules/member/PDF_card.class.php');
|
||||||
$obj = $db->fetch_object($result);
|
$pdfcardstatic=new PDF_card('5160',1,1,'mm');
|
||||||
$var=!$var;
|
$arrayoflabels=array_keys($pdfcardstatic->_Avery_Labels);
|
||||||
print '<form action="adherent.php" method="POST">';
|
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
|
||||||
print '<input type="hidden" name="action" value="update">';
|
|
||||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
|
||||||
print '<input type="hidden" name="constname" value="'.$obj->name.'">';
|
|
||||||
print '<input type="hidden" name="constnote" value="'.nl2br($obj->note).'">';
|
|
||||||
|
|
||||||
print "<tr $bc[$var]>";
|
$form->select_array('constvalue',$arrayoflabels,$obj->value,1,0,1);
|
||||||
|
print '</td><td>';
|
||||||
// Affiche nom constante
|
$form->select_array('consttype',array('yesno','texte','chaine'),1);
|
||||||
print '<td>';
|
|
||||||
print $langs->trans("Desc".$const) != ("Desc".$const) ? $langs->trans("Desc".$const) : $obj->note;
|
|
||||||
print "</td>\n";
|
|
||||||
|
|
||||||
if ($const == 'ADHERENT_ETIQUETTE_TYPE')
|
|
||||||
{
|
|
||||||
print '<td>';
|
|
||||||
// List of possible labels. Values must exists in
|
|
||||||
// file htdocs/adherents/PDF_Card.class.php
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/includes/modules/member/PDF_card.class.php');
|
|
||||||
$pdfcardstatic=new PDF_card('5160',1,1,'mm');
|
|
||||||
$arrayoflabels=array_keys($pdfcardstatic->_Avery_Labels);
|
|
||||||
|
|
||||||
$form->select_array('constvalue',$arrayoflabels,$obj->value,1,0,1);
|
|
||||||
print '</td><td>';
|
|
||||||
$form->select_array('consttype',array('yesno','texte','chaine'),1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<td>';
|
|
||||||
if ($obj->type == 'yesno')
|
|
||||||
{
|
|
||||||
print $form->selectyesno('constvalue',$obj->value,1);
|
|
||||||
print '</td><td>';
|
|
||||||
$form->select_array('consttype',array('yesno','texte','chaine'),0);
|
|
||||||
}
|
|
||||||
elseif ($obj->type == 'texte')
|
|
||||||
{
|
|
||||||
print '<textarea class="flat" name="constvalue" cols="35" rows="5" wrap="soft">';
|
|
||||||
print $obj->value;
|
|
||||||
print "</textarea>\n";
|
|
||||||
print '</td><td>';
|
|
||||||
$form->select_array('consttype',array('yesno','texte','chaine'),1);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<input type="text" class="flat" size="30" name="constvalue" value="'.$obj->value.'">';
|
|
||||||
print '</td><td>';
|
|
||||||
$form->select_array('consttype',array('yesno','texte','chaine'),2);
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
}
|
|
||||||
|
|
||||||
print '<td align="center">';
|
|
||||||
|
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button"> ';
|
|
||||||
// print '<a href="adherent.php?name='.$const.'&action=unset">'.img_delete().'</a>';
|
|
||||||
print "</td></tr>\n";
|
|
||||||
|
|
||||||
print '</form>';
|
|
||||||
$i++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
print '</table>';
|
else
|
||||||
|
{
|
||||||
|
print '<td>';
|
||||||
|
if ($obj->type == 'yesno')
|
||||||
|
{
|
||||||
|
print $form->selectyesno('constvalue',$obj->value,1);
|
||||||
|
print '</td><td>';
|
||||||
|
$form->select_array('consttype',array('yesno','texte','chaine'),0);
|
||||||
|
}
|
||||||
|
else if ($obj->type == 'texte')
|
||||||
|
{
|
||||||
|
print '<textarea class="flat" name="constvalue" cols="35" rows="5" wrap="soft">';
|
||||||
|
print $obj->value;
|
||||||
|
print "</textarea>\n";
|
||||||
|
print '</td><td>';
|
||||||
|
$form->select_array('consttype',array('yesno','texte','chaine'),1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<input type="text" class="flat" size="30" name="constvalue" value="'.$obj->value.'">';
|
||||||
|
print '</td><td>';
|
||||||
|
$form->select_array('consttype',array('yesno','texte','chaine'),2);
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
print '<td align="center">';
|
||||||
|
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button"> ';
|
||||||
|
// print '<a href="adherent.php?name='.$const.'&action=unset">'.img_delete().'</a>';
|
||||||
|
print "</td></tr>\n";
|
||||||
|
print '</form>';
|
||||||
|
$i++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
print '</table>';
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -84,7 +84,7 @@ if ( (isset($_POST["action"]) && $_POST["action"] == 'update')
|
|||||||
}
|
}
|
||||||
else dol_syslog($imgThumbSmall);
|
else dol_syslog($imgThumbSmall);
|
||||||
|
|
||||||
// Cr<EFBFBD>ation de la vignette de la page "Soci<EFBFBD>t<EFBFBD>/Institution"
|
// Creation de la vignette de la page "Societe/Institution"
|
||||||
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, 100, 30, '_mini', $quality);
|
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$original_file, 100, 30, '_mini', $quality);
|
||||||
if (eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
if (eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
||||||
{
|
{
|
||||||
@@ -135,7 +135,7 @@ if ($_GET["action"] == 'addthumb')
|
|||||||
// Create thumbs of logo
|
// Create thumbs of logo
|
||||||
if ($isimage > 0)
|
if ($isimage > 0)
|
||||||
{
|
{
|
||||||
// Cr<EFBFBD>ation de la vignette de la page login
|
// Creation de la vignette de la page login
|
||||||
$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], 200, 100, '_small',80);
|
$imgThumbSmall = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], 200, 100, '_small',80);
|
||||||
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbSmall,$reg))
|
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbSmall,$reg))
|
||||||
{
|
{
|
||||||
@@ -144,7 +144,7 @@ if ($_GET["action"] == 'addthumb')
|
|||||||
}
|
}
|
||||||
else dol_syslog($imgThumbSmall);
|
else dol_syslog($imgThumbSmall);
|
||||||
|
|
||||||
// Cr<EFBFBD>ation de la vignette de la page "Soci<EFBFBD>t<EFBFBD>/Institution"
|
// Creation de la vignette de la page "Societe/Institution"
|
||||||
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], 100, 30, '_mini',80);
|
$imgThumbMini = vignette($conf->mycompany->dir_output.'/logos/'.$_GET["file"], 100, 30, '_mini',80);
|
||||||
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
if (image_format_supported($imgThumbSmall) >= 0 && eregi('([^\\\/:]+)$',$imgThumbMini,$reg))
|
||||||
{
|
{
|
||||||
@@ -207,7 +207,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
|| (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
|
|| (isset($_POST["action"]) && $_POST["action"] == 'updateedit') )
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Edition des param<EFBFBD>tres
|
* Edition des parametres
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<form enctype="multipart/form-data" method="post" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
|
print '<form enctype="multipart/form-data" method="post" action="'.$_SERVER["PHP_SELF"].'" name="form_index">';
|
||||||
@@ -306,7 +306,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
|
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
// Identifiants de la soci<EFBFBD>t<EFBFBD> (propre au pays)
|
// Identifiants de la societe (propre au pays)
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("CompanyIds").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
$var=true;
|
$var=true;
|
||||||
@@ -421,7 +421,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* D<EFBFBD>but d'ann<EFBFBD>e fiscale
|
* Debut d'annee fiscale
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@@ -457,12 +457,12 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
print "</table>";
|
print "</table>";
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
/* Je d<EFBFBD>sactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le r<EFBFBD>el et franchise existe.
|
/* Je desactive cette option "facturation" car ce statut fiscal n'existe pas. Seul le reel et franchise existe.
|
||||||
Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il
|
Cette option ne doit donc pas etre en "exclusif" avec l'option fiscale de gestion de tva. Peut etre faut-il
|
||||||
une option a part qui n'entre pas en conflit avec les choix "assuj<EFBFBD>ti TVA" ou "non".
|
une option a part qui n'entre pas en conflit avec les choix "assujeti TVA" ou "non".
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>";
|
print "<tr ".$bc[$var]."><td width=\"140\"><label><input type=\"radio\" name=\"optiontva\" value=\"facturation\"".($conf->global->FACTURE_TVAOPTION == "facturation"?" checked":"")."> Option facturation</label></td>";
|
||||||
print "<td colspan=\"2\">L'option 'facturation' est utilis<EFBFBD>e par les entreprises qui payent la TVA <EFBFBD> facturation (vente de mat<EFBFBD>riel).</td></tr>\n";
|
print "<td colspan=\"2\">L'option 'facturation' est utilisee par les entreprises qui payent la TVA a facturation (vente de materiel).</td></tr>\n";
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@@ -486,7 +486,7 @@ if ((isset($_GET["action"]) && $_GET["action"] == 'edit')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Affichage des param<EFBFBD>tres
|
* Affichage des parametres
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($message) print $message.'<br>';
|
if ($message) print $message.'<br>';
|
||||||
@@ -549,7 +549,7 @@ else
|
|||||||
print $mysoc->logo;
|
print $mysoc->logo;
|
||||||
print '</td><td valign="center" align="right">';
|
print '</td><td valign="center" align="right">';
|
||||||
|
|
||||||
// On propose la g<EFBFBD>n<EFBFBD>ration de la vignette si elle n'existe pas
|
// On propose la generation de la vignette si elle n'existe pas
|
||||||
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && eregi('(\.jpg|\.jpeg|\.png)$',$mysoc->logo))
|
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && eregi('(\.jpg|\.jpeg|\.png)$',$mysoc->logo))
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
||||||
@@ -575,7 +575,7 @@ else
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
// Identifiants de la soci<EFBFBD>t<EFBFBD> (propre au pays)
|
// Identifiants de la societe (propre au pays)
|
||||||
print '<form name="formsoc" method="post">';
|
print '<form name="formsoc" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@@ -702,7 +702,7 @@ else
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* D<EFBFBD>but d'ann<EFBFBD>e fiscale
|
* Debut d'annee fiscale
|
||||||
*/
|
*/
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@@ -769,18 +769,19 @@ llxFooter('$Date$ - $Revision$');
|
|||||||
* \param code_iso Code iso de la devise
|
* \param code_iso Code iso de la devise
|
||||||
* \param withcode 1=affiche code + nom
|
* \param withcode 1=affiche code + nom
|
||||||
* \return string Nom traduit de la devise
|
* \return string Nom traduit de la devise
|
||||||
|
* TODO deplacer dans une classe
|
||||||
*/
|
*/
|
||||||
function currency_name($code_iso,$withcode=0)
|
function currency_name($code_iso,$withcode=0)
|
||||||
{
|
{
|
||||||
global $langs,$db;
|
global $langs,$db;
|
||||||
|
|
||||||
// Si il existe une traduction, on peut renvoyer de suite le libell<EFBFBD>
|
// Si il existe une traduction, on peut renvoyer de suite le libelle
|
||||||
if ($langs->trans("Currency".$code_iso)!="Currency".$code_iso)
|
if ($langs->trans("Currency".$code_iso)!="Currency".$code_iso)
|
||||||
{
|
{
|
||||||
return $langs->trans("Currency".$code_iso);
|
return $langs->trans("Currency".$code_iso);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si pas de traduction, on consulte le libell<EFBFBD> par d<EFBFBD>faut en table
|
// Si pas de traduction, on consulte le libelle par defaut en table
|
||||||
$sql = "SELECT label FROM ".MAIN_DB_PREFIX."c_currencies";
|
$sql = "SELECT label FROM ".MAIN_DB_PREFIX."c_currencies";
|
||||||
$sql.= " WHERE code_iso='".$code_iso."'";
|
$sql.= " WHERE code_iso='".$code_iso."'";
|
||||||
|
|
||||||
@@ -804,4 +805,4 @@ function currency_name($code_iso,$withcode=0)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -44,7 +44,7 @@ $modules = array(
|
|||||||
'MAILING' => 'FCKeditorForMailing',
|
'MAILING' => 'FCKeditorForMailing',
|
||||||
'DETAILS' => 'FCKeditorForProductDetails',
|
'DETAILS' => 'FCKeditorForProductDetails',
|
||||||
);
|
);
|
||||||
// Conditions pour que l'option soit propos<EFBFBD>e
|
// Conditions pour que l'option soit proposee
|
||||||
$conditions = array(
|
$conditions = array(
|
||||||
'USER' => 1,
|
'USER' => 1,
|
||||||
'SOCIETE' => $conf->societe->enabled,
|
'SOCIETE' => $conf->societe->enabled,
|
||||||
@@ -69,7 +69,7 @@ foreach($modules as $const => $desc)
|
|||||||
if ($_GET["action"] == 'activate_'.strtolower($const))
|
if ($_GET["action"] == 'activate_'.strtolower($const))
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1",'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1",'chaine',0,'',$conf->entity);
|
||||||
// Si fckeditor est activ<EFBFBD> dans la description produit/service, on l'active dans les formulaires
|
// Si fckeditor est active dans la description produit/service, on l'active dans les formulaires
|
||||||
if ($const == 'PRODUCTDESC' && $conf->global->PRODUIT_DESC_IN_FORM)
|
if ($const == 'PRODUCTDESC' && $conf->global->PRODUIT_DESC_IN_FORM)
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "FCKEDITOR_ENABLE_DETAILS", "1",'chaine',0,'',$conf->entity);
|
||||||
@@ -96,7 +96,7 @@ $linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToM
|
|||||||
print_fiche_titre($langs->trans("FCKEditor"),$linkback,'setup');
|
print_fiche_titre($langs->trans("FCKEditor"),$linkback,'setup');
|
||||||
print '<br>';
|
print '<br>';
|
||||||
/*
|
/*
|
||||||
* Activation/d<EFBFBD>sactivation de FCKeditor
|
* Activation/desactivation de FCKeditor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
@@ -147,4 +147,4 @@ print '</table>';
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
@@ -133,9 +133,9 @@ if ($_POST["action"] == 'add' && ($user->rights->produit->creer || $user->rights
|
|||||||
|
|
||||||
if ( $value != $current_lang ) $e_product = $product;
|
if ( $value != $current_lang ) $e_product = $product;
|
||||||
|
|
||||||
// Produit sp<73>cifique
|
// Specific product
|
||||||
// $_POST n'est pas utilise dans la classe Product
|
// $_POST n'est pas utilise dans la classe Product
|
||||||
// mais dans des classes qui h<EFBFBD>rite de Product
|
// mais dans des classes qui herite de Product
|
||||||
$id = $product->create($user);
|
$id = $product->create($user);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
@@ -202,7 +202,7 @@ if ($_POST["action"] == 'update' && ($user->rights->produit->creer || $user->rig
|
|||||||
$mesg = $langs->trans("ErrorProductBadRefOrLabel");
|
$mesg = $langs->trans("ErrorProductBadRefOrLabel");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Produit sp<73>cifique
|
// Specific product
|
||||||
if ($product->canvas <> '' && file_exists('templates/product.'.$product->canvas.'.class.php') )
|
if ($product->canvas <> '' && file_exists('templates/product.'.$product->canvas.'.class.php') )
|
||||||
{
|
{
|
||||||
$class = 'Product'.ucfirst($product->canvas);
|
$class = 'Product'.ucfirst($product->canvas);
|
||||||
@@ -564,7 +564,7 @@ $formproduct = new FormProduct($db);
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fiche cr<EFBFBD>ation du produit
|
* Fiche creation du produit
|
||||||
*/
|
*/
|
||||||
if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->rights->service->creer))
|
if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||||
{
|
{
|
||||||
@@ -639,7 +639,7 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ
|
|||||||
print '<input name="seuil_stock_alerte" type="hidden" value="0">';
|
print '<input name="seuil_stock_alerte" type="hidden" value="0">';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Description (utilis<EFBFBD> dans facture, propale...)
|
// Description (used in invoice, propal...)
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td>';
|
||||||
|
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
||||||
@@ -1042,7 +1042,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
print '</select>';
|
print '</select>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Description (utilis<EFBFBD> dans facture, propale...)
|
// Description (used in invoice, propal...)
|
||||||
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
print '<tr><td valign="top">'.$langs->trans("Description").'</td><td colspan="2">';
|
||||||
print "\n";
|
print "\n";
|
||||||
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)
|
||||||
@@ -1616,6 +1616,7 @@ llxFooter('$Date$ - $Revision$');
|
|||||||
/**
|
/**
|
||||||
* \brief Load tva_taux_value and tva_taux_libelle array
|
* \brief Load tva_taux_value and tva_taux_libelle array
|
||||||
* \remarks Ne sert que pour smarty
|
* \remarks Ne sert que pour smarty
|
||||||
|
* \ TODO deplacer dans une classe
|
||||||
*/
|
*/
|
||||||
function load_tva($db,$name='tauxtva', $defaulttx='', $societe_vendeuse='', $societe_acheteuse='', $taux_produit='')
|
function load_tva($db,$name='tauxtva', $defaulttx='', $societe_vendeuse='', $societe_acheteuse='', $taux_produit='')
|
||||||
{
|
{
|
||||||
@@ -1651,10 +1652,10 @@ function load_tva($db,$name='tauxtva', $defaulttx='', $societe_vendeuse='', $soc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// D<EFBFBD>finition du taux <EFBFBD> pr<EFBFBD>-s<EFBFBD>lectionner
|
// Definition du taux a pre-selectionner
|
||||||
if ($defaulttx == '') $defaulttx=get_default_tva($societe_vendeuse,$societe_acheteuse,$taux_produit);
|
if ($defaulttx == '') $defaulttx=get_default_tva($societe_vendeuse,$societe_acheteuse,$taux_produit);
|
||||||
// Si taux par defaut n'a pu etre trouv<EFBFBD>, on prend dernier.
|
// Si taux par defaut n'a pu etre trouve, on prend dernier.
|
||||||
// Comme ils sont tri<EFBFBD>s par ordre croissant, dernier = plus <EFBFBD>lev<EFBFBD> = taux courant
|
// Comme ils sont tries par ordre croissant, dernier = plus eleve = taux courant
|
||||||
if ($defaulttx == '') $defaulttx = $txtva[sizeof($txtva)-1];
|
if ($defaulttx == '') $defaulttx = $txtva[sizeof($txtva)-1];
|
||||||
|
|
||||||
$nbdetaux = sizeof($txtva);
|
$nbdetaux = sizeof($txtva);
|
||||||
|
|||||||
@@ -300,4 +300,4 @@ else
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
@@ -175,7 +175,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
|
|
||||||
$graph_data = array();
|
$graph_data = array();
|
||||||
|
|
||||||
// \todo Test si deja existant et recent, on ne genere pas
|
// TODO Test si deja existant et recent, on ne genere pas
|
||||||
if ($key == 'propal') $graph_data = $product->get_nb_propal($socid,$mode);
|
if ($key == 'propal') $graph_data = $product->get_nb_propal($socid,$mode);
|
||||||
if ($key == 'orders') $graph_data = $product->get_nb_order($socid,$mode);
|
if ($key == 'orders') $graph_data = $product->get_nb_order($socid,$mode);
|
||||||
if ($key == 'invoices') $graph_data = $product->get_nb_vente($socid,$mode);
|
if ($key == 'invoices') $graph_data = $product->get_nb_vente($socid,$mode);
|
||||||
@@ -232,7 +232,7 @@ if ($_GET["id"] || $_GET["ref"])
|
|||||||
//print $url;
|
//print $url;
|
||||||
print '<img src="'.$url.'" alt="'.$graphfiles[$key]['label'].'">';
|
print '<img src="'.$url.'" alt="'.$graphfiles[$key]['label'].'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
// Date g<EFBFBD>n<EFBFBD>ration
|
// Date generation
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
if (file_exists($dir."/".$graphfiles[$key]['file']) && filemtime($dir."/".$graphfiles[$key]['file']) && ! $px->isGraphKo())
|
if (file_exists($dir."/".$graphfiles[$key]['file']) && filemtime($dir."/".$graphfiles[$key]['file']) && ! $px->isGraphKo())
|
||||||
{
|
{
|
||||||
@@ -272,4 +272,4 @@ else
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date$ - $Revision$');
|
||||||
?>
|
?>
|
||||||
@@ -54,13 +54,13 @@ $soc = new Societe($db);
|
|||||||
|
|
||||||
if ($_POST["getcustomercode"])
|
if ($_POST["getcustomercode"])
|
||||||
{
|
{
|
||||||
// On d<EFBFBD>fini valeur pour code_client
|
// On defini valeur pour code_client
|
||||||
$_POST["code_client"]="aa";
|
$_POST["code_client"]="aa";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST["getsuppliercode"])
|
if ($_POST["getsuppliercode"])
|
||||||
{
|
{
|
||||||
// On d<EFBFBD>fini valeur pour code_fournisseur
|
// On defini valeur pour code_fournisseur
|
||||||
$_POST["code_fournisseur"]="aa";
|
$_POST["code_fournisseur"]="aa";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ if ((! $_POST["getcustomercode"] && ! $_POST["getsuppliercode"])
|
|||||||
$soc->effectif_id = $_POST["effectif_id"];
|
$soc->effectif_id = $_POST["effectif_id"];
|
||||||
if ($_REQUEST["private"] == 1)
|
if ($_REQUEST["private"] == 1)
|
||||||
{
|
{
|
||||||
$soc->typent_id = 8; // TODO pr<EFBFBD>voir autre m<EFBFBD>thode si le champs "particulier" change de rowid
|
$soc->typent_id = 8; // TODO prevoir autre methode si le champs "particulier" change de rowid
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -301,7 +301,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
|||||||
$modCodeFournisseur = new $module;
|
$modCodeFournisseur = new $module;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fiche societe en mode cr<EFBFBD>ation
|
* Fiche societe en mode creation
|
||||||
*/
|
*/
|
||||||
if ($_GET["type"]=='f') { $soc->fournisseur=1; }
|
if ($_GET["type"]=='f') { $soc->fournisseur=1; }
|
||||||
if ($_GET["type"]=='c') { $soc->client=1; }
|
if ($_GET["type"]=='c') { $soc->client=1; }
|
||||||
@@ -564,7 +564,7 @@ $_GET["action"] == 'create' || $_POST["action"] == 'create')
|
|||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
print '<tr><td>'.$langs->trans('VATIsUsed').'</td>';
|
print '<tr><td>'.$langs->trans('VATIsUsed').'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $html->selectyesno('assujtva_value',1,1); // Assujeti par d<EFBFBD>faut en creation
|
print $html->selectyesno('assujtva_value',1,1); // Assujeti par defaut en creation
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Code TVA
|
// Code TVA
|
||||||
@@ -634,7 +634,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
|||||||
}
|
}
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$module.".php");
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$module.".php");
|
||||||
$modCodeClient = new $module;
|
$modCodeClient = new $module;
|
||||||
// On v<EFBFBD>rifie si la balise pr<EFBFBD>fix est utilis<EFBFBD>e
|
// On verifie si la balise prefix est utilisee
|
||||||
if ($modCodeClient->code_auto)
|
if ($modCodeClient->code_auto)
|
||||||
{
|
{
|
||||||
$prefixCustomerIsUsed = $modCodeClient->verif_prefixIsUsed();
|
$prefixCustomerIsUsed = $modCodeClient->verif_prefixIsUsed();
|
||||||
@@ -647,7 +647,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
|||||||
}
|
}
|
||||||
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$module.".php");
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/societe/".$module.".php");
|
||||||
$modCodeFournisseur = new $module;
|
$modCodeFournisseur = new $module;
|
||||||
// On v<EFBFBD>rifie si la balise pr<EFBFBD>fix est utilis<EFBFBD>e
|
// On verifie si la balise prefix est utilisee
|
||||||
if ($modCodeFournisseur->code_auto)
|
if ($modCodeFournisseur->code_auto)
|
||||||
{
|
{
|
||||||
$prefixSupplierIsUsed = $modCodeFournisseur->verif_prefixIsUsed();
|
$prefixSupplierIsUsed = $modCodeFournisseur->verif_prefixIsUsed();
|
||||||
@@ -722,7 +722,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
|||||||
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="nom" value="'.$soc->nom.'"></td></tr>';
|
print '<tr><td>'.$langs->trans('Name').'</td><td colspan="3"><input type="text" size="40" name="nom" value="'.$soc->nom.'"></td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("Prefix").'</td><td colspan="3">';
|
||||||
// On ne permet pas la modification du pr<EFBFBD>fix en mode de num<EFBFBD>rotation auto utilisant le prefix
|
// On ne permet pas la modification du prefix en mode de numerotation auto utilisant le prefix
|
||||||
if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $soc->prefix_comm)
|
if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $soc->prefix_comm)
|
||||||
{
|
{
|
||||||
print '<input type="hidden" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
print '<input type="hidden" name="prefix_comm" value="'.$soc->prefix_comm.'">';
|
||||||
@@ -945,7 +945,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit')
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Fiche soci<EFBFBD>t<EFBFBD> en mode visu
|
* Fiche societe en mode visu
|
||||||
*/
|
*/
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->id = $socid;
|
$soc->id = $socid;
|
||||||
|
|||||||
@@ -1874,9 +1874,9 @@ class Societe extends CommonObject
|
|||||||
'LV', // Latvia
|
'LV', // Latvia
|
||||||
'LT', // Lithuania
|
'LT', // Lithuania
|
||||||
'LU', // Luxembourg
|
'LU', // Luxembourg
|
||||||
'MO', // Monaco
|
'MO', // Monaco ? TODO verify vat rules
|
||||||
'MT', // Malta
|
'MT', // Malta
|
||||||
'NO', // Norway
|
'NO', // Norway ? TODO verify vat rules
|
||||||
'PL', // Poland
|
'PL', // Poland
|
||||||
'PT', // Portugal
|
'PT', // Portugal
|
||||||
'RO', // Romania
|
'RO', // Romania
|
||||||
@@ -1884,7 +1884,7 @@ class Societe extends CommonObject
|
|||||||
'SI', // Slovenia
|
'SI', // Slovenia
|
||||||
'ES', // Spain
|
'ES', // Spain
|
||||||
'SE', // Sweden
|
'SE', // Sweden
|
||||||
'CH', // Switzerland
|
'CH', // Switzerland ? TODO verify vat rules
|
||||||
);
|
);
|
||||||
//print "dd".$this->pays_code;
|
//print "dd".$this->pays_code;
|
||||||
return in_array($this->pays_code,$country_code_in_EEC);
|
return in_array($this->pays_code,$country_code_in_EEC);
|
||||||
|
|||||||
Reference in New Issue
Block a user