diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 65ceb912ea9..c50985be5fc 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -183,7 +183,7 @@ $tabsql[10]= "SELECT t.rowid, t.code, t.taux, t.localtax1_type, t.localtax1, t.l $tabsql[11]= "SELECT t.rowid as rowid, t.element, t.source, t.code, t.libelle, t.position, t.active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; $tabsql[12]= "SELECT c.rowid as rowid, c.code, c.libelle, c.libelle_facture, c.nbjour, c.type_cdr, c.decalage, c.active, c.sortorder, c.entity FROM ".MAIN_DB_PREFIX."c_payment_term AS c WHERE c.entity = " . getEntity($tabname[12]); $tabsql[13]= "SELECT c.id as rowid, c.code, c.libelle, c.type, c.active, c.entity FROM ".MAIN_DB_PREFIX."c_paiement AS c WHERE c.entity = " . getEntity($tabname[13]); -$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.libelle, e.price, e.organization, e.fk_pays as country_id, c.code as country_code, c.label as country, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_country as c WHERE e.fk_pays=c.rowid and c.active=1"; +$tabsql[14]= "SELECT e.rowid as rowid, e.code as code, e.label, e.price, e.organization, e.fk_pays as country_id, c.code as country_code, c.label as country, e.active FROM ".MAIN_DB_PREFIX."c_ecotaxe AS e, ".MAIN_DB_PREFIX."c_country as c WHERE e.fk_pays=c.rowid and c.active=1"; $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, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectlevel"; $tabsql[17]= "SELECT id as rowid, code, label, accountancy_code, active FROM ".MAIN_DB_PREFIX."c_type_fees"; @@ -261,7 +261,7 @@ $tabfield[10]= "country_id,country,code,taux,localtax1_type,localtax1,localtax2_ $tabfield[11]= "element,source,code,libelle,position"; $tabfield[12]= "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder,entity"; $tabfield[13]= "code,libelle,type,entity"; -$tabfield[14]= "code,libelle,price,organization,country_id,country"; +$tabfield[14]= "code,label,price,organization,country_id,country"; $tabfield[15]= "code,libelle,width,height,unit"; $tabfield[16]= "code,libelle,sortorder"; $tabfield[17]= "code,label,accountancy_code"; @@ -300,7 +300,7 @@ $tabfieldvalue[10]= "country,code,taux,localtax1_type,localtax1,localtax2_type,l $tabfieldvalue[11]= "element,source,code,libelle,position"; $tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder"; $tabfieldvalue[13]= "code,libelle,type"; -$tabfieldvalue[14]= "code,libelle,price,organization,country"; +$tabfieldvalue[14]= "code,label,price,organization,country"; $tabfieldvalue[15]= "code,libelle,width,height,unit"; $tabfieldvalue[16]= "code,libelle,sortorder"; $tabfieldvalue[17]= "code,label,accountancy_code"; @@ -339,7 +339,7 @@ $tabfieldinsert[10]= "fk_pays,code,taux,localtax1_type,localtax1,localtax2_type, $tabfieldinsert[11]= "element,source,code,libelle,position"; $tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,type_cdr,decalage,sortorder,entity"; $tabfieldinsert[13]= "code,libelle,type,entity"; -$tabfieldinsert[14]= "code,libelle,price,organization,fk_pays"; +$tabfieldinsert[14]= "code,label,price,organization,fk_pays"; $tabfieldinsert[15]= "code,label,width,height,unit"; $tabfieldinsert[16]= "code,label,sortorder"; $tabfieldinsert[17]= "code,label,accountancy_code"; @@ -419,7 +419,7 @@ $tabcond[10]= true; $tabcond[11]= (! empty($conf->societe->enabled)); $tabcond[12]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled)); $tabcond[13]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->facture->enabled) || ! empty($conf->fournisseur->enabled)); -$tabcond[14]= (! empty($conf->product->enabled) && ! empty($conf->ecotax->enabled)); +$tabcond[14]= (! empty($conf->product->enabled) && (! empty($conf->ecotax->enabled) || ! empty($conf->global->MAIN_SHOW_ECOTAX_DICTIONNARY))); $tabcond[15]= true; $tabcond[16]= (! empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)); $tabcond[17]= (! empty($conf->deplacement->enabled) || ! empty($conf->expensereport->enabled)); diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 59fe3385c61..907a3cea79e 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -321,10 +321,8 @@ if (empty($conf->use_javascript_ajax) || ! empty($conf->global->MAIN_ECM_DISABLE $nbofentries=0; $oldvallevel=0; - $var=true; foreach($sqltree as $key => $val) { - $var=false; $ecmdirstatic->id=$val['id']; $ecmdirstatic->ref=$val['label']; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 4eb59a1c1ce..098b75a81b6 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -165,7 +165,7 @@ class FormOther { global $langs; - $sql = "SELECT e.rowid, e.code, e.libelle, e.price, e.organization,"; + $sql = "SELECT e.rowid, e.code, e.label, e.price, e.organization,"; $sql.= " c.label as country"; $sql.= " FROM ".MAIN_DB_PREFIX."c_ecotaxe as e,".MAIN_DB_PREFIX."c_country as c"; $sql.= " WHERE e.active = 1 AND e.fk_pays = c.rowid"; @@ -191,7 +191,7 @@ class FormOther else { print ''; - //print ''; + //print ''; } $selectOptionValue = $obj->code.' : '.price($obj->price).' '.$langs->trans("HT").' ('.$obj->organization.')'; print $selectOptionValue; diff --git a/htdocs/don/tpl/linkedobjectblock.tpl.php b/htdocs/don/tpl/linkedobjectblock.tpl.php index fdf6ae71c2f..d7ad6587845 100644 --- a/htdocs/don/tpl/linkedobjectblock.tpl.php +++ b/htdocs/don/tpl/linkedobjectblock.tpl.php @@ -33,12 +33,11 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("donations"); $total=0; $ilink=0; -$var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $trclass=($var?'pair':'impair'); + $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index b0d085838a8..15b75495c38 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1403,7 +1403,6 @@ else if ($id > 0 || ! empty($ref)) print ' '; print "\n"; } - $var=true; while ($i < $num) { $objp = $db->fetch_object($resql); diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 474c6774f26..6b8ce71bfb5 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -143,7 +143,6 @@ if ($resql) print ''; } - $var=true; $bool=false; foreach ($listofstatus as $status) { @@ -198,10 +197,8 @@ if (! empty($conf->ficheinter->enabled)) if ($num) { $i = 0; - $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; print ''; @@ -248,10 +245,8 @@ if ($resql) if ($num) { $i = 0; - $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; @@ -319,10 +314,8 @@ if (! empty($conf->ficheinter->enabled)) if ($num) { $i = 0; - $var = true; while ($i < $num) { - $obj = $db->fetch_object($resql); print ''; print ''; diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index b00b1391003..7a68bef34ec 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -285,7 +285,6 @@ print '%'; print ''; $oldyear=0; -$var=true; foreach ($data as $val) { $year = $val['year']; @@ -293,7 +292,7 @@ foreach ($data as $val) { // If we have empty year $oldyear--; - print ''; + print ''; print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$oldyear.''; print '0'; @@ -306,7 +305,7 @@ foreach ($data as $val) } - print ''; + print ''; print '0?'&socid='.$socid:'').($userid>0?'&userid='.$userid:'').'">'.$year.''; print ''.$val['nb'].''; print ''.round($val['nb_diff']).''; diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index dca78609c61..8bed3f28fe2 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -36,12 +36,11 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("interventions"); $ilink=0; -$var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $trclass=($var?'pair':'impair'); + $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 773e9da06c0..971f99717f4 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -935,13 +935,11 @@ if ($resql) $projectstatic=new Project($db); $i=0; - $var=true; $totalarray=array(); while ($i < min($num,$limit)) { $obj = $db->fetch_object($resql); - $objectstatic->id=$obj->rowid; $objectstatic->ref=$obj->ref; $objectstatic->ref_supplier = $obj->ref_supplier; diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index bdcfb3fdca8..4ce44845bf6 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php @@ -38,12 +38,11 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; $langs->load("orders"); $total=0; $ilink=0; -$var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $trclass=($var?'pair':'impair'); + $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 7f96bab0b09..c5c726eec81 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2006 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Florian Henry * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Marcos García @@ -44,10 +44,8 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (!$user->rights->fournisseur->facture->lire) accessforbidden(); -$langs->load("bills"); -$langs->load("companies"); -$langs->load('products'); -$langs->load('projects'); +// Load translation files required by the page +$langs->loadLangs(array('products', 'bills', 'companies', 'projects')); $action=GETPOST('action','alpha'); $massaction=GETPOST('massaction','alpha'); @@ -823,7 +821,6 @@ if ($resql) { $i=0; - $var=true; $totalarray=array(); while ($i < min($num,$limit)) { diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index ee7f5f99769..c20b26b1263 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -146,17 +146,15 @@ if ($year) print ''.$langs->trans("Size").''; print ''.$langs->trans("Date").''; print ''; - $var=true; if (is_resource($handle)) { while (($file = readdir($handle))!==false) { if (preg_match('/^supplier_payment/i',$file)) { - $tfile = $dir . '/'.$year.'/'.$file; $relativepath = $year.'/'.$file; - print "".''.img_pdf().' '.$file.''; + print ''.''.img_pdf().' '.$file.''; print ''.dol_print_size(dol_filesize($tfile)).''; print ''.dol_print_date(dol_filemtime($tfile),"dayhour").''; } diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index fc5821b96f8..e680c18074e 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -26,8 +26,8 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -$langs->load("companies"); -$langs->load("bills"); +// Load translation files required by the page +$langs->loadLangs(array('bills', 'companies')); // Security check $socid = GETPOST("socid",'int'); @@ -82,7 +82,6 @@ if ($socid > 0) $resql=$db->query($sql); if ($resql) { - $var=true; $num = $db->num_rows($resql); print ''; @@ -116,7 +115,6 @@ if ($socid > 0) } $totalpaye = $fac->getSommePaiement(); - print ''; print "".dol_print_date($fac->date)."\n"; diff --git a/htdocs/install/mysql/data/llx_c_ecotaxe.sql b/htdocs/install/mysql/data/llx_c_ecotaxe.sql index 92046f38d0c..845ffa1e685 100644 --- a/htdocs/install/mysql/data/llx_c_ecotaxe.sql +++ b/htdocs/install/mysql/data/llx_c_ecotaxe.sql @@ -3,7 +3,7 @@ -- Copyright (C) 2004-2009 Laurent Destailleur -- Copyright (C) 2004 Benoit Mortier -- Copyright (C) 2004 Guillaume Delecourt --- Copyright (C) 2005-2009 Regis Houssin +-- Copyright (C) 2005-2018 Regis Houssin -- Copyright (C) 2007 Patrick Raguin -- -- This program is free software; you can redistribute it and/or modify @@ -30,46 +30,23 @@ -- Eco-Taxes -- --- France (Organisme ERP) -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 1, 'ER-A-A', 'Materiels electriques < 0,2kg', 0.01000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 2, 'ER-A-B', 'Materiels electriques >= 0,2 kg et < 0,5 kg', 0.03000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 3, 'ER-A-C', 'Materiels electriques >= 0,5 kg et < 1 kg', 0.04000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 4, 'ER-A-D', 'Materiels electriques >= 1 kg et < 2 kg', 0.13000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 5, 'ER-A-E', 'Materiels electriques >= 2 kg et < 4kg', 0.21000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 6, 'ER-A-F', 'Materiels electriques >= 4 kg et < 8 kg', 0.42000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 7, 'ER-A-G', 'Materiels electriques >= 8 kg et < 15 kg', 0.84000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 8, 'ER-A-H', 'Materiels electriques >= 15 kg et < 20 kg', 1.25000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES ( 9, 'ER-A-I', 'Materiels electriques >= 20 kg et < 30 kg', 1.88000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (10, 'ER-A-J', 'Materiels electriques >= 30 kg', 3.34000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (11, 'ER-M-1', 'TV, Moniteurs < 9kg', 0.84000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (12, 'ER-M-2', 'TV, Moniteurs >= 9kg et < 15kg', 1.67000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (13, 'ER-M-3', 'TV, Moniteurs >= 15kg et < 30kg', 3.34000000, 'ERP', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (14, 'ER-M-4', 'TV, Moniteurs >= 30 kg', 6.69000000, 'ERP', 1, 1); - --- France (Organisme Ecologic) -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (15, 'EC-A-A', 'Materiels electriques 0,2 kg max', 0.00840000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (16, 'EC-A-B', 'Materiels electriques 0,21 kg min - 0,50 kg max', 0.02500000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (17, 'EC-A-C', 'Materiels electriques 0,51 kg min - 1 kg max', 0.04000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (18, 'EC-A-D', 'Materiels electriques 1,01 kg min - 2,5 kg max', 0.13000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (19, 'EC-A-E', 'Materiels electriques 2,51 kg min - 4 kg max', 0.21000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (20, 'EC-A-F', 'Materiels electriques 4,01 kg min - 8 kg max', 0.42000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (21, 'EC-A-G', 'Materiels electriques 8,01 kg min - 12 kg max', 0.63000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (22, 'EC-A-H', 'Materiels electriques 12,01 kg min - 20 kg max', 1.05000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (23, 'EC-A-I', 'Materiels electriques 20,01 kg min', 1.88000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (24, 'EC-M-1', 'TV, Moniteurs 9 kg max', 0.84000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (25, 'EC-M-2', 'TV, Moniteurs 9,01 kg min - 18 kg max', 1.67000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (26, 'EC-M-3', 'TV, Moniteurs 18,01 kg min - 36 kg max', 3.34000000, 'Ecologic', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (27, 'EC-M-4', 'TV, Moniteurs 36,01 kg min', 6.69000000, 'Ecologic', 1, 1); - --- France (Organisme Eco-systemes) -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (28, 'ES-M-1', 'TV, Moniteurs <= 20 pouces', 0.84000000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (29, 'ES-M-2', 'TV, Moniteurs > 20 pouces et <= 32 pouces', 3.34000000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (30, 'ES-M-3', 'TV, Moniteurs > 32 pouces et autres grands ecrans', 6.69000000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (31, 'ES-A-A', 'Ordinateur fixe, Audio home systems (HIFI), elements hifi separes', 0.84000000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (32, 'ES-A-B', 'Ordinateur portable, CD-RCR, VCR, lecteurs et enregistreurs DVD, instruments de musique et caisses de resonance, haut parleurs...', 0.25000000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (33, 'ES-A-C', 'Imprimante, photocopieur, telecopieur', 0.42000000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (34, 'ES-A-D', 'Accessoires, clavier, souris, PDA, imprimante photo, appareil photo, gps, telephone, repondeur, telephone sans fil, modem, telecommande, casque, camescope, baladeur mp3, radio portable, radio K7 et CD portable, radio reveil', 0.08400000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (35, 'ES-A-E', 'GSM', 0.00840000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (36, 'ES-A-F', 'Jouets et equipements de loisirs et de sports < 0,5 kg', 0.04200000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (37, 'ES-A-G', 'Jouets et equipements de loisirs et de sports > 0,5 kg', 0.17000000, 'Eco-systemes', 1, 1); -INSERT INTO llx_c_ecotaxe (rowid, code, libelle, price, organization, fk_pays, active) VALUES (38, 'ES-A-H', 'Jouets et equipements de loisirs et de sports > 10 kg', 1.25000000, 'Eco-systemes', 1, 1); +-- France (Organisme Eco-systèmes) +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (1, '25040', 'PETIT APPAREILS MENAGERS', 0.25000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (2, '25050', 'TRES PETIT APPAREILS MENAGERS', 0.08000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (3, '32070', 'ECRAN POIDS < 5 KG', 2.08000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (4, '32080', 'ECRAN POIDS > 5 KG', 1.25000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (5, '32051', 'ORDINATEUR PORTABLE', 0.42000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (6, '32061', 'TABLETTE INFORMATIQUE', 0.84000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (7, '36011', 'ORDINATEUR FIXE (UC)', 1.15000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (8, '36021', 'IMPRIMANTES', 0.83000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (9, '36030', 'IT (INFORMATIQUE ET TELECOMS)', 0.83000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (10, '36040', 'PETIT IT (CLAVIERS / SOURIS)', 0.08000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (11, '36050', 'TELEPHONIE MOBILE', 0.02000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (12, '36060', 'CONNECTIQUE CABLES', 0.02000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (13, '45010', 'GROS MATERIEL GRAND PUBLIC (TELEAGRANDISSEURS)', 1.67000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (14, '45020', 'MOYEN MATERIEL GRAND PUBLIC (LOUPES ELECTRONIQUES)', 0.42000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (15, '45030', 'PETIT MATERIEL GRAND PUBLIC (VIE QUOTIDIENNE)', 0.08000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (16, '75030', 'JOUETS < 0,5 KG', 0.08000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (17, '75040', 'JOUETS ENTRE 0,5 KG ET 10 KG', 0.17000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (18, '74050', 'JOUETS > 10 KG', 1.67000000, 'Eco-systèmes', 1, 1); +INSERT INTO llx_c_ecotaxe (rowid, code, label, price, organization, fk_pays, active) VALUES (19, '85010', 'EQUIPEMENT MEDICAL < 0,5 KG', 0.08000000, 'Eco-systèmes', 1, 1); diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index 6882405e47e..017f272b986 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -100,6 +100,8 @@ ALTER TABLE llx_inventory MODIFY COLUMN fk_warehouse integer DEFAULT NULL; ALTER TABLE llx_c_type_fees DROP COLUMN llx_c_type_fees; ALTER TABLE llx_c_type_fees ADD COLUMN type integer DEFAULT 0; +ALTER TABLE llx_c_ecotax CHANGE COLUMN libelle label varchar(255); + ALTER TABLE llx_product_fournisseur_price DROP COLUMN unitcharges; ALTER TABLE llx_societe ADD COLUMN fk_entrepot integer DEFAULT 0; diff --git a/htdocs/install/mysql/tables/llx_c_ecotaxe.sql b/htdocs/install/mysql/tables/llx_c_ecotaxe.sql index 09613787f76..cd67bb34766 100644 --- a/htdocs/install/mysql/tables/llx_c_ecotaxe.sql +++ b/htdocs/install/mysql/tables/llx_c_ecotaxe.sql @@ -1,6 +1,6 @@ -- ======================================================================== --- Copyright (C) 2007 Regis Houssin --- Copyright (C) 2009 Laurent Destailleur +-- Copyright (C) 2007-2018 Regis Houssin +-- Copyright (C) 2009 Laurent Destailleur -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by @@ -19,11 +19,11 @@ create table llx_c_ecotaxe ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - code varchar(64) NOT NULL, -- Code servant a la traduction et a la reference interne - libelle varchar(255), -- Description - price double(24,8), -- Montant HT - organization varchar(255), -- Organisme gerant le bareme tarifaire - fk_pays integer NOT NULL, -- Pays correspondant - active tinyint DEFAULT 1 NOT NULL + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(64) NOT NULL, -- Code servant a la traduction et a la reference interne + label varchar(255), -- Description + price double(24,8), -- Montant HT + organization varchar(255), -- Organisme gerant le bareme tarifaire + fk_pays integer NOT NULL, -- Pays correspondant + active tinyint DEFAULT 1 NOT NULL )ENGINE=innodb; \ No newline at end of file