diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index 1b3e9822106..ee8951864c0 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -105,7 +105,7 @@ class html_cerfafr extends ModeleDon else { $donref = dol_sanitizeFileName($don->ref); - $dir = $conf->don->dir_output . "/" . get_exdir($donref,2,0,1,$don,'donation') . "/" . dol_sanitizeFileName($don->ref); + $dir = $conf->don->dir_output . "/" . $donref; $file = $dir . "/" . $donref . ".html"; } diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 323f36bd609..b56171b8796 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -229,6 +229,25 @@ if ($action == 'set_paid') setEventMessage($object->error, 'errors'); } } +// Remove file in doc form +if ($action == 'remove_file') +{ + $object = new Don($db, 0, $_GET['id']); + if ($object->fetch($id)) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $object->fetch_thirdparty(); + + $langs->load("other"); + $upload_dir = $conf->don->dir_output; + $file = $upload_dir . '/' . GETPOST('file'); + $ret=dol_delete_file($file,0,0,0,$object); + if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile'))); + else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors'); + $action=''; + } +} /* * Build doc @@ -743,13 +762,11 @@ if (! empty($id) && $action != 'edit') /* * Documents generes */ - $filename=dol_sanitizeFileName($object->id); - $filedir=$conf->don->dir_output . '/' . get_exdir($filename,2,0,1,$object,'donation'). '/'. dol_sanitizeFileName($object->ref); - $urlsource=$_SERVER['PHP_SELF'].'?rowid='.$object->id; - // $genallowed=($fac->statut == 1 && ($fac->paye == 0 || $user->admin) && $user->rights->facture->creer); - // $delallowed=$user->rights->facture->supprimer; - $genallowed=1; - $delallowed=0; + $filename = dol_sanitizeFileName($object->id); + $filedir = $conf->don->dir_output . "/" . dol_sanitizeFileName($object->id); + $urlsource = $_SERVER['PHP_SELF'].'?rowid='.$object->id; + $genallowed = ($object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->creer); + $delallowed = $user->rights->don->supprimer; $var=true; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 250ba2304ae..70f8a980495 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -709,6 +709,7 @@ GoIntoSetupToChangeLogo=Go into Home - Setup - Company to change logo or go into Deny=Deny Denied=Denied ListOfTemplates=List of templates +Gender=Gender Genderman=Man Genderwoman=Woman ViewList=List view diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 704a0db9442..7ba7ecbdf1d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013-2014 Marcos García * Copyright (C) 2012-2013 Cédric Salvador - * Copyright (C) 2011-2014 Alexandre Spangaro + * Copyright (C) 2011-2015 Alexandre Spangaro * Copyright (C) 2014 Cédric Gross * Copyright (C) 2014-2015 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry @@ -1785,6 +1785,8 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) print ''; print load_fiche_titre($langs->trans("Add"),'',''); + + dol_fiche_head(''); $html .= ''.$langs->trans("Quantity").' '; $html .= ''.$langs->trans("ReductionShort").'(%) '; @@ -1794,6 +1796,8 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) print ''; print $html; print '
'; + + dol_fiche_end(); print '
'; print ''; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index fe715801f11..866abd856b1 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -6,6 +6,7 @@ * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2014 Ion Agorria + * Copyright (C) 2015 Alexandre Spangaro * * 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 @@ -320,6 +321,8 @@ if ($id || $ref) print '
'; print ''; print ''; + + dol_fiche_head(); print ''; @@ -487,9 +490,11 @@ if ($id || $ref) print '
'; - print '
'; + dol_fiche_end(); + + print '
'; print ''; - print '   '; + print '     '; print ''; print '
'; @@ -536,6 +541,7 @@ if ($id || $ref) print_liste_field_titre($langs->trans("UnitPriceHT"),$_SERVER["PHP_SELF"],"pfp.unitprice","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre($langs->trans("DiscountQtyMin")); print_liste_field_titre($langs->trans("NbDaysToDelivery"),$_SERVER["PHP_SELF"],"pfp.delivery_time_days","",$param,'align="right"',$sortfield,$sortorder); + // Charges ???? if ($conf->global->PRODUCT_CHARGES) { diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 4114005ecdd..b3b884cbd7e 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -8,6 +8,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2014 Philippe Grand * Copyright (C) 2014 Ion agorria + * Copyright (C) 2015 Alexandre Spangaro * * 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 @@ -690,6 +691,9 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print ''; print ''; print ''; + + dol_fiche_head(''); + print ''; // VAT @@ -706,7 +710,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print ''; print ''; - //Only show price mode and expression selector if module is enabled + // Only show price mode and expression selector if module is enabled if (! empty($conf->dynamicprices->enabled)) { // Price mode selector print '
'.$langs->trans("PriceMode").''; @@ -771,7 +775,9 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print '
'; - print '
'; + dol_fiche_end(); + + print '
'; print ''; print '     '; print ''; @@ -787,6 +793,9 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print ''; print ''; print ''; + + dol_fiche_head(''); + print ''; // VAT @@ -826,9 +835,14 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> } print ''; - print ''; + print '
 '; + print '
'; + print '   '; print '
'; + + dol_fiche_end(); + print ''; } }