commit
603c44c37c
@ -105,7 +105,7 @@ class html_cerfafr extends ModeleDon
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$donref = dol_sanitizeFileName($don->ref);
|
$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";
|
$file = $dir . "/" . $donref . ".html";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -229,6 +229,25 @@ if ($action == 'set_paid')
|
|||||||
setEventMessage($object->error, 'errors');
|
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
|
* Build doc
|
||||||
@ -744,12 +763,10 @@ if (! empty($id) && $action != 'edit')
|
|||||||
* Documents generes
|
* Documents generes
|
||||||
*/
|
*/
|
||||||
$filename = dol_sanitizeFileName($object->id);
|
$filename = dol_sanitizeFileName($object->id);
|
||||||
$filedir=$conf->don->dir_output . '/' . get_exdir($filename,2,0,1,$object,'donation'). '/'. dol_sanitizeFileName($object->ref);
|
$filedir = $conf->don->dir_output . "/" . dol_sanitizeFileName($object->id);
|
||||||
$urlsource = $_SERVER['PHP_SELF'].'?rowid='.$object->id;
|
$urlsource = $_SERVER['PHP_SELF'].'?rowid='.$object->id;
|
||||||
// $genallowed=($fac->statut == 1 && ($fac->paye == 0 || $user->admin) && $user->rights->facture->creer);
|
$genallowed = ($object->statut == 2 && ($object->paid == 0 || $user->admin) && $user->rights->don->creer);
|
||||||
// $delallowed=$user->rights->facture->supprimer;
|
$delallowed = $user->rights->don->supprimer;
|
||||||
$genallowed=1;
|
|
||||||
$delallowed=0;
|
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
|
|||||||
@ -709,6 +709,7 @@ GoIntoSetupToChangeLogo=Go into Home - Setup - Company to change logo or go into
|
|||||||
Deny=Deny
|
Deny=Deny
|
||||||
Denied=Denied
|
Denied=Denied
|
||||||
ListOfTemplates=List of templates
|
ListOfTemplates=List of templates
|
||||||
|
Gender=Gender
|
||||||
Genderman=Man
|
Genderman=Man
|
||||||
Genderwoman=Woman
|
Genderwoman=Woman
|
||||||
ViewList=List view
|
ViewList=List view
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2013-2014 Marcos García <marcosgdf@gmail.com>
|
* Copyright (C) 2013-2014 Marcos García <marcosgdf@gmail.com>
|
||||||
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||||
* Copyright (C) 2011-2014 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
* Copyright (C) 2011-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||||
@ -1786,6 +1786,8 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("Add"),'','');
|
print load_fiche_titre($langs->trans("Add"),'','');
|
||||||
|
|
||||||
|
dol_fiche_head('');
|
||||||
|
|
||||||
$html .= '<tr><td class="nowrap">'.$langs->trans("Quantity").' ';
|
$html .= '<tr><td class="nowrap">'.$langs->trans("Quantity").' ';
|
||||||
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
$html .= '<input type="text" class="flat" name="qty" size="1" value="1"></td><td class="nowrap">'.$langs->trans("ReductionShort").'(%) ';
|
||||||
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
$html .= '<input type="text" class="flat" name="remise_percent" size="1" value="0">';
|
||||||
@ -1795,6 +1797,8 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status)
|
|||||||
print $html;
|
print $html;
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
print '<div class="center">';
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
* Copyright (C) 2014 Ion Agorria <ion@agorria.com>
|
||||||
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -321,6 +322,8 @@ if ($id || $ref)
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="updateprice">';
|
print '<input type="hidden" name="action" value="updateprice">';
|
||||||
|
|
||||||
|
dol_fiche_head();
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Supplier").'</td><td>';
|
print '<tr><td class="fieldrequired" width="25%">'.$langs->trans("Supplier").'</td><td>';
|
||||||
@ -487,9 +490,11 @@ if ($id || $ref)
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br><div class="center">';
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<div class="center">';
|
||||||
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
print '<input class="button" type="submit" value="'.$langs->trans("Save").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input class="button" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
@ -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("UnitPriceHT"),$_SERVER["PHP_SELF"],"pfp.unitprice","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("DiscountQtyMin"));
|
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);
|
print_liste_field_titre($langs->trans("NbDaysToDelivery"),$_SERVER["PHP_SELF"],"pfp.delivery_time_days","",$param,'align="right"',$sortfield,$sortorder);
|
||||||
|
|
||||||
// Charges ????
|
// Charges ????
|
||||||
if ($conf->global->PRODUCT_CHARGES)
|
if ($conf->global->PRODUCT_CHARGES)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,6 +8,7 @@
|
|||||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
|
* Copyright (C) 2014 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
|
* Copyright (C) 2014 Ion agorria <ion@agorria.com>
|
||||||
|
* Copyright (C) 2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* 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 '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="action" value="update_price">';
|
print '<input type="hidden" name="action" value="update_price">';
|
||||||
print '<input type="hidden" name="id" value="' . $object->id . '">';
|
print '<input type="hidden" name="id" value="' . $object->id . '">';
|
||||||
|
|
||||||
|
dol_fiche_head('');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
@ -771,7 +775,9 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
print '<br><div class="center">';
|
dol_fiche_end();
|
||||||
|
|
||||||
|
print '<div class="center">';
|
||||||
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
print '<input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">';
|
||||||
@ -787,6 +793,9 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION ['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="action" value="update_price">';
|
print '<input type="hidden" name="action" value="update_price">';
|
||||||
print '<input type="hidden" name="id" value="' . $object->id . '">';
|
print '<input type="hidden" name="id" value="' . $object->id . '">';
|
||||||
|
|
||||||
|
dol_fiche_head('');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// VAT
|
// VAT
|
||||||
@ -826,9 +835,14 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights->
|
|||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="' . $langs->trans("Save") . '"> ';
|
print '<tr><td colspan="2" align="center"><input type="submit" class="button" value="' . $langs->trans("Save") . '">';
|
||||||
|
print ' ';
|
||||||
print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '"></td></tr>';
|
print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '"></td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user