mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-08 10:03:00 +01:00
Fix: delete of documents is done by page of element, not by the view
wrapper.
This commit is contained in:
@@ -476,11 +476,11 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
|
||||
$object->fetch($id);
|
||||
$result=$object->setPaymentTerms(GETPOST('cond_reglement_id','int'));
|
||||
if ($result < 0)
|
||||
{
|
||||
{
|
||||
dol_print_error($db,$object->error);
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
// Define output language
|
||||
@@ -496,7 +496,7 @@ else if ($action == 'setconditions' && $user->rights->commande->creer)
|
||||
$ret=$object->fetch($id); // Reload to get new records
|
||||
commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setremisepercent' && $user->rights->commande->creer)
|
||||
@@ -1028,10 +1028,11 @@ else if ($action == 'remove_file')
|
||||
{
|
||||
require_once(DOL_DOCUMENT_ROOT."/core/lib/files.lib.php");
|
||||
|
||||
$langs->load("other");
|
||||
$upload_dir = $conf->commande->dir_output;
|
||||
$file = $upload_dir . '/' . $_GET['file'];
|
||||
$file = $upload_dir . '/' . GETPOST('file');
|
||||
dol_delete_file($file);
|
||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved").'</div>';
|
||||
$mesg = '<div class="ok">'.$langs->trans("FileWasRemoved",GETPOST('file')).'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user