New: Add dictionnary for type of fees in fees and trips module

This commit is contained in:
Laurent Destailleur 2008-05-27 22:30:52 +00:00
parent af144bef23
commit 7f376ced57
4 changed files with 45 additions and 23 deletions

View File

@ -22,7 +22,7 @@
/** /**
\file htdocs/admin/dict.php \file htdocs/admin/dict.php
\ingroup setup \ingroup setup
\brief Page d'administration des dictionnaires de donn<EFBFBD>es \brief Page to administer data tables
\version $Id$ \version $Id$
*/ */
@ -46,7 +46,7 @@ $active = 1;
// Mettre ici tous les caract<63>ristiques des dictionnaires // Mettre ici tous les caract<63>ristiques des dictionnaires
// Ordres d'affichage des dictionnaires (0 pour espace) // Ordres d'affichage des dictionnaires (0 pour espace)
$taborder=array(9,0,4,3,2,0,1,8,16,0,5,11,0,6,0,10,12,13,0,14,0,7,0,15); $taborder=array(9,0,4,3,2,0,1,8,16,0,5,11,0,6,0,10,12,13,0,14,0,7,17,0,15);
// Nom des tables des dictionnaires // Nom des tables des dictionnaires
$tabname[1] = MAIN_DB_PREFIX."c_forme_juridique"; $tabname[1] = MAIN_DB_PREFIX."c_forme_juridique";
@ -65,6 +65,7 @@ $tabname[13]= MAIN_DB_PREFIX."c_paiement";
$tabname[14]= MAIN_DB_PREFIX."c_ecotaxe"; $tabname[14]= MAIN_DB_PREFIX."c_ecotaxe";
$tabname[15]= MAIN_DB_PREFIX."c_paper_format"; $tabname[15]= MAIN_DB_PREFIX."c_paper_format";
$tabname[16]= MAIN_DB_PREFIX."c_prospectlevel"; $tabname[16]= MAIN_DB_PREFIX."c_prospectlevel";
$tabname[17]= MAIN_DB_PREFIX."c_type_fees";
// Libell<6C> des dictionnaires // Libell<6C> des dictionnaires
$tablib[1] = $langs->trans("DictionnaryCompanyJuridicalType"); $tablib[1] = $langs->trans("DictionnaryCompanyJuridicalType");
@ -83,6 +84,7 @@ $tablib[13]= $langs->trans("DictionnaryPaymentModes");
$tablib[14]= $langs->trans("DictionnaryEcotaxe"); $tablib[14]= $langs->trans("DictionnaryEcotaxe");
$tablib[15]= $langs->trans("DictionnaryPaperFormat"); $tablib[15]= $langs->trans("DictionnaryPaperFormat");
$tablib[16]= $langs->trans("DictionnaryProspectLevel"); $tablib[16]= $langs->trans("DictionnaryProspectLevel");
$tablib[17]= $langs->trans("DictionnaryFees");
// Requete pour extraction des donn<6E>es des dictionnaires // Requete pour extraction des donn<6E>es des dictionnaires
$tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid"; $tabsql[1] = "SELECT f.rowid as rowid, f.code, f.libelle, p.libelle as pays, f.active FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_pays as p WHERE f.fk_pays=p.rowid";
@ -101,6 +103,7 @@ $tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN
$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as pays_id, p.libelle as pays, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_pays as p WHERE e.fk_pays=p.rowid and p.active=1"; $tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as pays_id, p.libelle as pays, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_pays as p WHERE e.fk_pays=p.rowid and p.active=1";
$tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format"; $tabsql[15]= "SELECT rowid as rowid, code, label as libelle, width, height, unit, active FROM ".MAIN_DB_PREFIX."c_paper_format";
$tabsql[16]= "SELECT code, label as libelle, active FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $tabsql[16]= "SELECT code, label as libelle, active FROM ".MAIN_DB_PREFIX."c_prospectlevel";
$tabsql[17]= "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_fees";
// Critere de tri du dictionnaire // Critere de tri du dictionnaire
$tabsqlsort[1] ="pays, code ASC"; $tabsqlsort[1] ="pays, code ASC";
@ -119,7 +122,8 @@ $tabsqlsort[13]="code ASC";
$tabsqlsort[14]="pays, e.organization ASC, code ASC"; $tabsqlsort[14]="pays, e.organization ASC, code ASC";
$tabsqlsort[15]="rowid ASC"; $tabsqlsort[15]="rowid ASC";
$tabsqlsort[16]="sortorder ASC"; $tabsqlsort[16]="sortorder ASC";
$tabsqlsort[17]="code ASC";
// Nom des champs en resultat de select pour affichage du dictionnaire // Nom des champs en resultat de select pour affichage du dictionnaire
$tabfield[1] = "code,libelle,pays"; $tabfield[1] = "code,libelle,pays";
$tabfield[2] = "code,libelle,region_id,region"; // "code,libelle,region" $tabfield[2] = "code,libelle,region_id,region"; // "code,libelle,region"
@ -137,8 +141,9 @@ $tabfield[13]= "code,libelle,type";
$tabfield[14]= "code,libelle,price,organization,pays_id,pays"; $tabfield[14]= "code,libelle,price,organization,pays_id,pays";
$tabfield[15]= "code,libelle,width,height,unit"; $tabfield[15]= "code,libelle,width,height,unit";
$tabfield[16]= "code,libelle"; $tabfield[16]= "code,libelle";
$tabfield[17]= "code,libelle";
// Nom des champs d'<EFBFBD>dition pour modification du dictionnaire // Nom des champs d'edition pour modification du dictionnaire
$tabfieldvalue[1] = "code,libelle,pays"; $tabfieldvalue[1] = "code,libelle,pays";
$tabfieldvalue[2] = "code,libelle,region"; // "code,libelle,region" $tabfieldvalue[2] = "code,libelle,region"; // "code,libelle,region"
$tabfieldvalue[3] = "code,libelle,pays"; $tabfieldvalue[3] = "code,libelle,pays";
@ -155,6 +160,7 @@ $tabfieldvalue[13]= "code,libelle,type";
$tabfieldvalue[14]= "code,libelle,price,organization,pays"; $tabfieldvalue[14]= "code,libelle,price,organization,pays";
$tabfieldvalue[15]= "code,libelle,width,height,unit"; $tabfieldvalue[15]= "code,libelle,width,height,unit";
$tabfieldvalue[16]= "code,libelle"; $tabfieldvalue[16]= "code,libelle";
$tabfieldvalue[17]= "code,libelle";
// Nom des champs dans la table pour insertion d'un enregistrement // Nom des champs dans la table pour insertion d'un enregistrement
$tabfieldinsert[1] = "code,libelle,fk_pays"; $tabfieldinsert[1] = "code,libelle,fk_pays";
@ -173,6 +179,7 @@ $tabfieldinsert[13]= "code,libelle,type";
$tabfieldinsert[14]= "code,libelle,price,organization,fk_pays"; $tabfieldinsert[14]= "code,libelle,price,organization,fk_pays";
$tabfieldinsert[15]= "code,label,width,height,unit"; $tabfieldinsert[15]= "code,label,width,height,unit";
$tabfieldinsert[16]= "code,label"; $tabfieldinsert[16]= "code,label";
$tabfieldinsert[17]= "code,libelle";
// Nom du rowid si le champ n'est pas de type autoincr<63>ment // Nom du rowid si le champ n'est pas de type autoincr<63>ment
$tabrowid[1] = ""; $tabrowid[1] = "";
@ -191,6 +198,7 @@ $tabrowid[13]= "id";
$tabrowid[14]= ""; $tabrowid[14]= "";
$tabrowid[15]= ""; $tabrowid[15]= "";
$tabrowid[16]= "code"; $tabrowid[16]= "code";
$tabrowid[17]= "id";
// Condition to show dictionnary in setup page // Condition to show dictionnary in setup page
$tabcond[1] = true; $tabcond[1] = true;
@ -209,6 +217,7 @@ $tabcond[13]= $conf->facture->enabled||$conf->fournisseur->enabled;
$tabcond[14]= $conf->produit->enabled&&$conf->global->PRODUIT_USE_ECOTAXE; $tabcond[14]= $conf->produit->enabled&&$conf->global->PRODUIT_USE_ECOTAXE;
$tabcond[15]= true; $tabcond[15]= true;
$tabcond[16]= $conf->societe->enabled; $tabcond[16]= $conf->societe->enabled;
$tabcond[17]= $conf->deplacement->enabled;
$msg=''; $msg='';
@ -217,7 +226,7 @@ $sortfield=$_GET["sortfield"];
$sortorder=$_GET["sortorder"]; $sortorder=$_GET["sortorder"];
/* /*
* Actions ajout ou modification d'une entr<EFBFBD>e dans un dictionnaire de donn<EFBFBD>e * Actions ajout ou modification d'une entree dans un dictionnaire de donnee
*/ */
if ($_POST["actionadd"] || $_POST["actionmodify"]) if ($_POST["actionadd"] || $_POST["actionmodify"])
{ {
@ -397,28 +406,37 @@ if ($_GET["action"] == $acts[1]) // disable
} }
/*
llxHeader(); * View
*/
$html = new Form($db); $html = new Form($db);
llxHeader();
$titre=$langs->trans("DictionnarySetup"); $titre=$langs->trans("DictionnarySetup");
$linkback='';
if ($_GET["id"]) if ($_GET["id"])
{ {
$titre.=' - '.$tablib[$_GET["id"]]; $titre.=' - '.$tablib[$_GET["id"]];
$linkback='<a href="'.DOL_URL_ROOT.'/admin/dict.php">'.$langs->trans("BackToDictionnaryList").'</a>';
} }
print_fiche_titre($titre,'','setup'); print_fiche_titre($titre,$linkback,'setup');
print $langs->trans("DictionnaryDesc"); if (empty($_GET["id"]))
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n"; {
print "<br>\n"; print $langs->trans("DictionnaryDesc");
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
}
print "<br>\n";
/* /*
* Confirmation de la suppression de la ligne * Confirmation de la suppression de la ligne
*/ */
if ($_GET['action'] == 'delete') if ($_GET['action'] == 'delete')
{ {
$html = new Form($db); $html = new Form($db);
$html->form_confirm($_SERVER["PHP_SELF"].'?sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$_GET["rowid"].'&amp;code='.$_GET["code"].'&amp;id='.$_GET["id"], $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete'); $html->form_confirm($_SERVER["PHP_SELF"].'?sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$_GET["rowid"].'&amp;code='.$_GET["code"].'&amp;id='.$_GET["id"], $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete');
print '<br>'; print '<br>';
} }
@ -433,7 +451,7 @@ if ($_GET["id"])
print $msg.'<br>'; print $msg.'<br>';
} }
// Compl<EFBFBD>te requete recherche valeurs avec critere de tri // Complete requete recherche valeurs avec critere de tri
$sql=$tabsql[$_GET["id"]]; $sql=$tabsql[$_GET["id"]];
if ($_GET["sortfield"]) if ($_GET["sortfield"])
{ {

View File

@ -396,19 +396,21 @@ if ($_POST["cancel"] == $langs->trans("Cancel"))
/*
* View
*/
llxHeader("","","Fiche Mailing"); llxHeader("","","Fiche Mailing");
$html = new Form($db);
/*
* Mailing en mode création
*
*/
$mil = new Mailing($db); $mil = new Mailing($db);
if ($_GET["action"] == 'create') if ($_GET["action"] == 'create')
{ {
print '<form action="fiche.php" method="post">'."\n"; // Mailing en mode création
print '<form action="fiche.php" method="post">'."\n";
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print_titre($langs->trans("NewMailing")); print_titre($langs->trans("NewMailing"));
@ -446,8 +448,6 @@ if ($_GET["action"] == 'create')
} }
else else
{ {
$html = new Form($db);
if ($mil->fetch($_GET["id"]) >= 0) if ($mil->fetch($_GET["id"]) >= 0)
{ {
@ -543,8 +543,8 @@ else
// Message // Message
print '<tr><td valign="top">'.$langs->trans("MailMessage").'</td>'; print '<tr><td valign="top">'.$langs->trans("MailMessage").'</td>';
print '<td colspan="3" bgcolor="#FFFFFF">'; print '<td colspan="3">';
print nl2br($mil->body); print dol_htmlentitiesbr($mil->body);
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';

View File

@ -435,8 +435,10 @@ DictionnaryPaymentModes=Payments modes
DictionnaryTypeContact=Contacts types DictionnaryTypeContact=Contacts types
DictionnaryEcotaxe=Ecotaxe (WEEE) DictionnaryEcotaxe=Ecotaxe (WEEE)
DictionnaryPaperFormat=Paper formats DictionnaryPaperFormat=Paper formats
DictionnaryFees=Type of fees
SetupSaved=Setup saved SetupSaved=Setup saved
BackToModuleList=Back to modules list BackToModuleList=Back to modules list
BackToDictionnaryList=Back to dictionnaries list
VATReceivedOnly=Special rate not billed VATReceivedOnly=Special rate not billed
VATManagement=VAT Management VATManagement=VAT Management
VATIsUsedDesc=The VAT rate by default when creating prospects, invoices, orders etc follow the active standard rule:<br>If the seller is subjected to VAT, then VAT by default=0. End of rule.<br>If the (selling country = buying country), then the VAT by default=VAT of the product in the selling country. End of rule. <br>If seller and buyer in the European Community and goods are sold having new means of transport (car, ship, plane), the default VAT=0 ( The VAT should be paid by the buyer at the customoffice of his country and not at the seller). End of rule.<br>If seller and buyer in the European Community and goods sold by other means rather than new means of transport, then the VAT by default=VAT of product sold. End of rule.<br>Else the proposed default VAT =1. End of rule. VATIsUsedDesc=The VAT rate by default when creating prospects, invoices, orders etc follow the active standard rule:<br>If the seller is subjected to VAT, then VAT by default=0. End of rule.<br>If the (selling country = buying country), then the VAT by default=VAT of the product in the selling country. End of rule. <br>If seller and buyer in the European Community and goods are sold having new means of transport (car, ship, plane), the default VAT=0 ( The VAT should be paid by the buyer at the customoffice of his country and not at the seller). End of rule.<br>If seller and buyer in the European Community and goods sold by other means rather than new means of transport, then the VAT by default=VAT of product sold. End of rule.<br>Else the proposed default VAT =1. End of rule.

View File

@ -433,8 +433,10 @@ DictionnaryPaymentModes=Modes de paiements
DictionnaryTypeContact=Types de contacts DictionnaryTypeContact=Types de contacts
DictionnaryEcotaxe=Barèmes Eco-participation (DEEE) DictionnaryEcotaxe=Barèmes Eco-participation (DEEE)
DictionnaryPaperFormat=Format papiers DictionnaryPaperFormat=Format papiers
DictionnaryFees=Types de déplacement et notes de frais
SetupSaved=Configuration sauvegardée SetupSaved=Configuration sauvegardée
BackToModuleList=Retour liste des modules BackToModuleList=Retour liste des modules
BackToDictionnaryList=Retour liste des dictionnaires
VATReceivedOnly=Taux special non facturé VATReceivedOnly=Taux special non facturé
VATManagement=Gestion TVA VATManagement=Gestion TVA
VATIsUsedDesc=Le taux de TVA proposé par défaut lors de la création de propale, facture, commande, etc répond à la règle standard suivante:<br>Si vendeur non assujeti à TVA, TVA par défaut=0. Fin de règle.<br>Si le (pays vendeur = pays acheteur) alors TVA par défaut=TVA du produit vendu. Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par défaut=0 (La TVA doit être payé par acheteur au centre d'impots de son pays et non au vendeur). Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et acheteur = particulier ou entreprise sans num TVA intra alors TVA par défaut=TVA du produit vendu. Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et acheteur = entreprise avec num TVA intra alors TVA par défaut=0. Fin de règle.<br>Sinon TVA proposée par défaut=0. Fin de règle.<br> VATIsUsedDesc=Le taux de TVA proposé par défaut lors de la création de propale, facture, commande, etc répond à la règle standard suivante:<br>Si vendeur non assujeti à TVA, TVA par défaut=0. Fin de règle.<br>Si le (pays vendeur = pays acheteur) alors TVA par défaut=TVA du produit vendu. Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et bien vendu = moyen de transports neuf (auto, bateau, avion), TVA par défaut=0 (La TVA doit être payé par acheteur au centre d'impots de son pays et non au vendeur). Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et acheteur = particulier ou entreprise sans num TVA intra alors TVA par défaut=TVA du produit vendu. Fin de règle.<br>Si vendeur et acheteur dans Communauté européenne et acheteur = entreprise avec num TVA intra alors TVA par défaut=0. Fin de règle.<br>Sinon TVA proposée par défaut=0. Fin de règle.<br>