30 |
*/ |
*/ |
31 |
|
|
32 |
require('./pre.inc.php'); |
require('./pre.inc.php'); |
33 |
|
require_once(DOL_DOCUMENT_ROOT ."/includes/modules/facture/modules_facture.php"); |
|
$user->getrights('facture'); |
|
|
$user->getrights('banque'); |
|
|
|
|
|
if (!$user->rights->facture->lire) |
|
|
accessforbidden(); |
|
|
|
|
|
$langs->load('bills'); |
|
|
|
|
34 |
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php'); |
require_once(DOL_DOCUMENT_ROOT.'/facture.class.php'); |
35 |
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php'); |
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php'); |
36 |
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php'); |
require_once(DOL_DOCUMENT_ROOT.'/lib/CMailFile.class.php'); |
39 |
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php'); |
if ($conf->contrat->enabled) require_once(DOL_DOCUMENT_ROOT.'/contrat/contrat.class.php'); |
40 |
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php'); |
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php'); |
41 |
|
|
42 |
|
$user->getrights('facture'); |
43 |
|
$user->getrights('banque'); |
44 |
|
|
45 |
|
if (!$user->rights->facture->lire) |
46 |
|
accessforbidden(); |
47 |
|
|
48 |
|
$langs->load('bills'); |
49 |
|
|
50 |
$sall=isset($_GET['sall'])?$_GET['sall']:$_POST['sall']; |
$sall=isset($_GET['sall'])?$_GET['sall']:$_POST['sall']; |
51 |
if (isset($_GET['msg'])) { $msg=urldecode($_GET['msg']); } |
if (isset($_GET['msg'])) { $msg=urldecode($_GET['msg']); } |
403 |
{ |
{ |
404 |
$fac = new Facture($db); |
$fac = new Facture($db); |
405 |
$fac->fetch($_GET['facid']); |
$fac->fetch($_GET['facid']); |
406 |
$result = $fac->set_canceled(); |
$result = $fac->set_canceled($user); |
|
$_GET['facid'] = 0 ; |
|
|
Header('Location: facture.php'); |
|
|
exit; |
|
407 |
} |
} |
408 |
} |
} |
409 |
|
|
548 |
*/ |
*/ |
549 |
if ($_GET['action'] == 'pdf') |
if ($_GET['action'] == 'pdf') |
550 |
{ |
{ |
|
// Generation de la facture définie dans /includes/modules/facture/modules_facture.php |
|
|
// Génère également le fichier meta dans le meme répertoire (pour faciliter les recherches et indexation) |
|
551 |
facture_pdf_create($db, $_GET['facid']); |
facture_pdf_create($db, $_GET['facid']); |
552 |
} |
} |
553 |
|
|