Added files to Order detail
This commit is contained in:
@@ -4,5 +4,5 @@ foreach($shippings as $ship):
|
||||
$order = $ship->order;
|
||||
$owner = $order->owner;
|
||||
?>
|
||||
"<?=$me->username?>";XINON GmbH;Fladnitz 150;Studenzen;8322;AT;office@xinon.at;O;43;311540800;"<?=$owner->company?>";"<?=$owner->getFullName()?>";"<?=($ship->termination_id) ? $ship->termination->building->street : $owner->street?>";"<?=$owner->city?>";AT;<?=($ship->termination_id) ? $ship->termination->building->zip : $owner->zip?>;0;<?=$owner->splitPhoneNumber()[0]?>;<?=$owner->splitPhoneNumber()[1]?>;;170863186;;;1;<?=$ship->ship_weight?>;<?=$ship->ship_length?>;<?=$ship->ship_width?>;<?=$ship->ship_height?>;DOM;EUR;;"Ware, not restricted";P;<?=$owner->customer_number?>;"<?=$owner->email?>";office@xinon.at;;;N;N;;
|
||||
"<?=$me->name?>";XINON GmbH;Fladnitz 150;Studenzen;8322;AT;office@xinon.at;O;43;311540800;"<?=$owner->company?>";"<?=$owner->getFullName()?>";"<?=($ship->termination_id) ? $ship->termination->building->street : $owner->street?>";"<?=$owner->city?>";AT;<?=($ship->termination_id) ? $ship->termination->building->zip : $owner->zip?>;0;<?=$owner->splitPhoneNumber()[0]?>;<?=$owner->splitPhoneNumber()[1]?>;;170863186;;;1;<?=$ship->ship_weight?>;<?=$ship->ship_length?>;<?=$ship->ship_width?>;<?=$ship->ship_height?>;DOM;EUR;;"Ware, not restricted";P;<?=$owner->customer_number?>;"<?=$owner->email?>";office@xinon.at;;;N;N;;
|
||||
<?php endforeach; ?>
|
||||
@@ -203,6 +203,7 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a class="nav-link active" href="#order-detail-<?=$order->id?>-journal" data-toggle="tab" aria-expanded="false">Journal</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-details" data-toggle="tab" aria-expanded="false">Details</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-files" data-toggle="tab" aria-expanded="false">Dokumente</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -321,7 +322,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="order-detail-<?=$order->id?>-files" class="tab-pane">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-8 col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<?php if(is_array($order->files) && count($order->files)): ?>
|
||||
<table class="table table-sm table-striped table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Beschreibung</th>
|
||||
<th>Dateiname</th>
|
||||
<th>Hochgeladen</th>
|
||||
<th>Zuletzt bearbeitet</th>
|
||||
</tr>
|
||||
<?php foreach($order->files as $file): ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("File", "Download", ['id' => $file->file->id])?>"><?=$file->name?></a></td>
|
||||
<td><?=nl2br($file->description)?></td>
|
||||
<td><?=$file->file->filename?></td>
|
||||
<td class="text-monospace"><?=date("d.m.Y", $file->create)?> (<?=$file->creator->name?>)</td>
|
||||
<td class="text-monospace"><?=date("d.m.Y", $file->edit)?> (<?=$file->editor->name?>)</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine Dokumente hinterlegt.</p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -492,6 +530,7 @@
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item"><a class="nav-link active" href="#order-detail-<?=$order->id?>-journal" data-toggle="tab" aria-expanded="false">Journal</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-details" data-toggle="tab" aria-expanded="false">Details</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#order-detail-<?=$order->id?>-files" data-toggle="tab" aria-expanded="false">Dokumente</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -610,6 +649,42 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="order-detail-<?=$order->id?>-files" class="tab-pane">
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-xl-8 col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<?php if(is_array($order->files) && count($order->files)): ?>
|
||||
<table class="table table-sm table-striped table-hover">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Beschreibung</th>
|
||||
<th>Dateiname</th>
|
||||
<th>Hochgeladen</th>
|
||||
<th>Zuletzt bearbeitet</th>
|
||||
</tr>
|
||||
<?php foreach($order->files as $file): ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("File", "Download", ['id' => $file->file->id])?>"><?=$file->name?></a></td>
|
||||
<td><?=nl2br($file->description)?></td>
|
||||
<td><?=$file->file->filename?></td>
|
||||
<td class="text-monospace"><?=date("d.m.Y", $file->create)?> (<?=$file->creator->name?>)</td>
|
||||
<td class="text-monospace"><?=date("d.m.Y", $file->edit)?> (<?=$file->editor->name?>)</td>
|
||||
</tr>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php else: ?>
|
||||
<p>Keine Dokumente hinterlegt.</p>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,6 +76,7 @@ class CpeshippingController extends mfBaseController {
|
||||
//$values = $tpl->getReturnedValue();
|
||||
|
||||
header("Content-type: text/csv");
|
||||
header("Content-disposition: attachment; filename=\"dhl-shipment-".date("Y-m-d-H-i-s").".csv\"");
|
||||
echo $body;exit;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user