Added andom-tec Layout package
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Cpeshipping")?>">CPE Versand</a></li>
|
||||
<li class="breadcrumb-item active">Versand-CSV History</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">CPE Versand</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a class="btn btn-warning" href="<?=self::getUrl("Cpeshipping")?>">Zurück zu CPE-Versand</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title">Versand-CSVs</h4>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Versand-CSVs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Versand-CSVs gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th>Dateiname</th>
|
||||
<th>Name</th>
|
||||
<th>Versandt von</th>
|
||||
</tr>
|
||||
<?php foreach($shippings as $s): ?>
|
||||
<tr>
|
||||
<td><a href="<?=self::getUrl("File", "download", ["id" => $s->file_id])?>"><?=$s->file->filename?></a></td>
|
||||
<td><?=$s->file->name?></td>
|
||||
<td><?=$s->creator->name?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Versand-CSVs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine Versand-CSVs gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var download_id;
|
||||
var hash = window.location.hash.substr(1);
|
||||
var match = hash.match(/download=(\d+)/);
|
||||
if(match && match[1]) {
|
||||
download_id = match[1]
|
||||
console.log("<?=self::getUrl("File", "download")?>?id=" + download_id);
|
||||
window.location.href="<?=self::getUrl("File", "download")?>?id=" + download_id;
|
||||
window.location.hash = "";
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -0,0 +1,174 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/header.php"); ?>
|
||||
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box">
|
||||
<div class="page-title-right">
|
||||
<ol class="breadcrumb m-0">
|
||||
<li class="breadcrumb-item"><a href="<?=self::getUrl("Dashboard")?>">the-tool</a></li>
|
||||
<li class="breadcrumb-item active">CPE Versand</li>
|
||||
</ol>
|
||||
</div>
|
||||
<h4 class="page-title">CPE Versand</h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a class="btn btn-success" href="<?=self::getUrl("Cpeshipping/History")?>">History anzeigen</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
<h4 class="header-title">CPE Versand</h4>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Zu versendende CPEs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine CPEs zum Versenden gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<form method="post" id="submit-form" action="<?=self::getUrl("Cpeshipping", "save")?>">
|
||||
<table class="table table-striped table-hover">
|
||||
<tr>
|
||||
<th class="text-center">Versand<br /><input type="checkbox" id="checkAll" class="form-control" /></th>
|
||||
<th class="text-center">Vorleistungsdienst<br />bestellt</th>
|
||||
<th>Gerät</th>
|
||||
<th>Lieferort</th>
|
||||
<th>Kunde</th>
|
||||
<th>Kundennummer</th>
|
||||
</tr>
|
||||
<?php foreach($cpeprovisionings as $c): ?>
|
||||
<tr>
|
||||
<td class="versand-checkbox text-center"><input type="checkbox" class="form-control" id="ship-<?=$c->id?>" name="ships[]" value="<?=$c->id?>" /></td>
|
||||
<td class="text-center">
|
||||
<?php if(array_key_exists("hostnetwork_order", $c->orderproduct->product->attributes) && $c->orderproduct->product->attributes['hostnetwork_order']->value): ?>
|
||||
<input type="hidden" name="prov[]" value="<?=$c->id?>" />
|
||||
<input type="checkbox" class="form-control" id="external_finish-<?=$c->id?>" name="external_finish[<?=$c->id?>]" value="1" <?=($c->external_finished) ? "checked='checked'" : ""?> />
|
||||
<span id="ship-error-<?=$c->id?>" class="text-danger hidden">Vorleistungsdienst muss bestellt sein vor Versand!</span>
|
||||
<span class="text-info" <?=($c->external_finished_by) ? "title='Vorleistungsdienst bestellt von ".$c->external_finisher->name." (".$c->external_finisher->address->getCompanyOrName(true).")'" : ""?>>
|
||||
<?php if($c->external_finished_by): ?>
|
||||
<?=($c->external_finished_by) ? $c->external_finisher->getAbbrName() : ""?>
|
||||
<?php endif; ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<i>nicht erforderlich</i>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?=$c->routertype?></td>
|
||||
<td><?=($c->termination_id) ? $c->termination->building->zip." ".$c->termination->building->city : $c->order->owner->zip." ".$c->order->owner->city?></td>
|
||||
<td><?=$c->order->owner->getCompanyOrName()?></td>
|
||||
<td><?=$c->order->owner->customer_number?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button type="submit" name="type" class="btn btn-outline-primary" value="save" />Speichern</button>
|
||||
<button type="submit" name="type" class="btn btn-primary ml-2" value="ship" >Versand-CSV generieren</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<?php if($pagination['maxItems'] > $pagination['count']): ?>
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center mb-1">
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod, "Index", ["filter" => $filter])?>" tabindex="-1">Erste</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['start'] - $pagination['count'] < 0) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] - $pagination['count'], "filter" => $filter])?>" tabindex="-1">Zurück</a>
|
||||
</li>
|
||||
<?php for($i = 0; $i < ($pagination['maxItems'] / $pagination['count']); $i++): ?>
|
||||
<li class="page-item <?=($pagination['start'] == $i*$pagination['count']) ? "disabled font-weight-bold" : ""?>"><a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $i*$pagination['count'], "filter" => $filter])?>"><?=$i+1?></a></li>
|
||||
<?php endfor; ?>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => $pagination['start'] + $pagination['count'], "filter" => $filter])?>">Vor</a>
|
||||
</li>
|
||||
<li class="page-item <?=($pagination['maxItems'] / ($pagination['start'] + $pagination['count']) < 1) ? "disabled" : ""?>">
|
||||
<a class="page-link" href="<?=$this->getUrl($Mod,"Index",['s' => ($pagination['maxItems'] - $pagination['maxItems'] % $pagination['count']), "filter" => $filter])?>">Letzte</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<div class="pagination justify-content-center">
|
||||
<?php if($pagination['maxItems']): ?>
|
||||
Zu versendende CPEs <?=$pagination['start']+1?> bis <?=($pagination['start'] + $pagination['count'] > $pagination['maxItems']) ? $pagination['maxItems'] : $pagination['start'] + $pagination['count']?> von <?=$pagination['maxItems']?>
|
||||
<?php else: ?>
|
||||
Keine CPEs zum Versenden gefunden
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#checkAll").click(function() {
|
||||
$('.versand-checkbox input:checkbox').not(this).prop('checked', this.checked);
|
||||
});
|
||||
});
|
||||
|
||||
$("#submit-form" ).submit(function( event ) {
|
||||
$('[id^=ship-error-').each(function() {
|
||||
$(this).hide();
|
||||
});
|
||||
|
||||
var error = false;
|
||||
|
||||
$('input[id^=external_finish-]').each(function() {
|
||||
var id_match = $(this).attr("id").match(/external_finish-(\d+)$/);
|
||||
var id = id_match[1];
|
||||
|
||||
if(!$("input[id^=external_finish-").is(":checked")) {
|
||||
if($("#ship-" + id).is(":checked")) {
|
||||
error = true;
|
||||
$("#ship-error-" + id).show();
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
if(error) {
|
||||
console.log("not submitting");
|
||||
event.preventDefault();
|
||||
}
|
||||
return;
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/footer.php"); ?>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
foreach($shippings as $ship):
|
||||
$order = $ship->order;
|
||||
$owner = $order->owner;
|
||||
?>
|
||||
"<?=$me->name?>";"XINON GmbH";"Fladnitz 150";"8322";"Studenzen";"AT";"office@xinon.at";"43";"311540800";"<?=$owner->getFullName()?>";"<?=($owner->company) ? $owner->company : $owner->getFullName()?>";"<?=($ship->termination_id) ? $ship->termination->building->street : $owner->street?>";"<?=($ship->termination_id) ? $ship->termination->building->zip : $owner->zip?>";"<?=($ship->termination_id) ? $ship->termination->building->city : $owner->city?>";"AT";"<?=$owner->splitPhoneNumber()[0]?>";"<?=$owner->splitPhoneNumber()[1]?>";"170863186";"<?=$ship->ship_weight?>";"EUR";"100";"DOM";"Elektronik";"1";"1";"<?=$ship->ship_length?>";"<?=$ship->ship_width?>";"<?=$ship->ship_height?>";"<?=$owner->customer_number?>";"<?=$owner->email?>"
|
||||
<?php endforeach;?>
|
||||
Reference in New Issue
Block a user