31 |
|
|
32 |
require("./pre.inc.php"); |
require("./pre.inc.php"); |
33 |
|
|
34 |
|
$langs->load("bills"); |
35 |
|
|
36 |
if (!$user->rights->expedition->lire) |
if (!$user->rights->expedition->lire) |
37 |
accessforbidden(); |
accessforbidden(); |
445 |
dolibarr_print_error($db); |
dolibarr_print_error($db); |
446 |
} |
} |
447 |
|
|
448 |
print "</table><br>\n"; |
print "</table>\n"; |
449 |
|
|
450 |
print "\n</div>\n"; |
print "\n</div>\n"; |
451 |
|
|
|
/* |
|
|
* |
|
|
*/ |
|
|
$file = $expedition->pdf_filename; |
|
|
if (file_exists($file)) |
|
|
{ |
|
|
print_titre($langs->trans("Documents")); |
|
|
print '<table class="border" width="50%">'; |
|
|
print "<tr $bc[$var]><td>".$langs->trans("Sending")." PDF</td>"; |
|
|
|
|
|
$b = ereg_replace($conf->expedition->dir_output."/","",$file); |
|
|
|
|
|
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=expedition&file='.urlencode($b).'">'.basename($file).'</a></td>'; |
|
|
print '<td align="right">'.filesize($file). ' bytes</td>'; |
|
|
print '<td align="right">'.dolibarr_print_date(filemtime($file),"%d %B %Y %H:%M:%S").'</td></tr>'; |
|
|
print "</table>"; |
|
|
} |
|
|
|
|
452 |
|
|
453 |
/* |
/* |
454 |
* |
* |
472 |
print '</div>'; |
print '</div>'; |
473 |
} |
} |
474 |
|
|
475 |
|
|
476 |
|
/* |
477 |
|
* Documents générés |
478 |
|
*/ |
479 |
|
$filename=sanitize_string($expedition->id); |
480 |
|
$filedir=$conf->expedition->dir_output . "/" .get_exdir($expedition->id); |
481 |
|
$urlsource=$_SERVER["PHP_SELF"]."?id=".$expedition->id; |
482 |
|
//$genallowed=$user->rights->expedition->creer; |
483 |
|
//$delallowed=$user->rights->expedition->supprimer; |
484 |
|
$genallowed=0; |
485 |
|
$delallowed=0; |
486 |
|
|
487 |
|
$var=true; |
488 |
|
|
489 |
|
print "<br>\n"; |
490 |
|
$html->show_documents('expedition',$filename,$filedir,$urlsource,$genallowed,$delallowed,$propal->modelpdf); |
491 |
|
|
492 |
|
|
493 |
/* |
/* |
494 |
* Déjà livré |
* Déjà livré |
495 |
* |
* |
|
* |
|
496 |
*/ |
*/ |
497 |
$sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande"; |
$sql = "SELECT cd.fk_product, cd.description, cd.rowid, cd.qty as qty_commande"; |
498 |
$sql .= " , ed.qty as qty_livre, e.ref"; |
$sql .= " , ed.qty as qty_livre, e.ref"; |