diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 522e67f86b6..08d5315dc6c 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -34,7 +34,6 @@ require_once(DOL_DOCUMENT_ROOT."/facture.class.php"); require_once(DOL_DOCUMENT_ROOT."/lib/invoice.lib.php"); $langs->load('propal'); -$langs->load("bills"); $langs->load('compta'); $langs->load('other'); @@ -54,25 +53,25 @@ $action=empty($_GET['action']) ? (empty($_POST['action']) ? '' : $_POST['action' // Envoi fichier if ($_POST["sendit"] && $conf->upload) { - $facture = new Facture($db); - - if ($facture->fetch($facid)) + $facture = new Facture($db); + + if ($facture->fetch($facid)) { - $upload_dir = $conf->facture->dir_output . "/" . $facture->ref; - if (! is_dir($upload_dir)) create_exdir($upload_dir); - - if (is_dir($upload_dir)) + $upload_dir = $conf->facture->dir_output . "/" . $facture->ref; + if (! is_dir($upload_dir)) create_exdir($upload_dir); + + if (is_dir($upload_dir)) { - if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'])) + if (doliMoveFileUpload($_FILES['userfile']['tmp_name'], $upload_dir . "/" . $_FILES['userfile']['name'])) { - $mesg = '
'.$langs->trans("FileTransferComplete").'
'; - //print_r($_FILES); + $mesg = '
'.$langs->trans("FileTransferComplete").'
'; + //print_r($_FILES); } - else + else { - // Echec transfert (fichier dépassant la limite ?) - $mesg = '
'.$langs->trans("ErrorFileNotUploaded").'
'; - // print_r($_FILES); + // Echec transfert (fichier dépassant la limite ?) + $mesg = '
'.$langs->trans("ErrorFileNotUploaded").'
'; + // print_r($_FILES); } } } @@ -82,7 +81,7 @@ if ($_POST["sendit"] && $conf->upload) if ($action=='delete') { $facture = new Facture($db); - + if ($facture->fetch($facid)) { $upload_dir = $conf->facture->dir_output . "/" . $facture->ref; @@ -157,9 +156,8 @@ if ($facid > 0) print ''.$langs->trans("NbOfAttachedFiles").''.sizeof($filearray).''; print ''.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").''; - print ''; - - print ''; + print "\n"; + print "\n"; if ($mesg) { print $mesg."
"; } @@ -175,8 +173,7 @@ if ($facid > 0) print ''.$langs->trans("Document").''; print ''.$langs->trans("Size").''; print ''.$langs->trans("Date").''; - print ' '; - print ''; + print " \n"; if (is_dir($upload_dir)) {