Changed to contractqueue and contract
This commit is contained in:
@@ -438,7 +438,15 @@
|
||||
},
|
||||
function(success) {
|
||||
if(success.status != "OK") return;
|
||||
|
||||
|
||||
var sla_id;
|
||||
if(p.sla_id) {
|
||||
sla_id = p.sla_id;
|
||||
} else {
|
||||
sla_id = 4;
|
||||
}
|
||||
|
||||
|
||||
p = success.result.product;
|
||||
$("#vatgroup_id").val(p.vatgroup_id);
|
||||
$("#price").val(p.price);
|
||||
|
||||
@@ -240,8 +240,8 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="card border-top-warning">
|
||||
<div class="card-header">
|
||||
<h5>Journaleinträge</h5>
|
||||
@@ -267,7 +267,7 @@
|
||||
<?php if(strlen($j->text) > 120): ?>
|
||||
<td style="width: 100%" class="pointer" onclick="toggleTruncatedJournalText(<?=$j->id?>)">
|
||||
<span id="truncated-<?=$j->id?>"><i class="fas fa-caret-right"></i> <?=self::strtrim(str_replace(["\n", "\r", "\t"]," ", $j->text), 120)?></span>
|
||||
<span id="fulltext-<?=$j->id?>" class="hidden"><?=nl2br(htmlentities($j->text))?></span>
|
||||
<span id="fulltext-<?=$j->id?>" class="hidden"><?=nl2br($j->text)?></span>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td style="width: 100%">
|
||||
@@ -293,7 +293,7 @@
|
||||
<?php elseif($j->value == "import"): ?>
|
||||
<em>Vertrag importiert: <?=nl2br(htmlentities($j->text))?>
|
||||
<?php elseif($j->value == "order"): ?>
|
||||
<em>Vertrag aus Bestellung <a href="<?=self::getUrl("Order", "edit", ["id" => $contract->orderproduct->order_id])?>">#<?=$contract->orderproduct->order_id?></a> erstellt
|
||||
<em>Vertrag aus Bestellung <a href="<?=self::getUrl("Order", "", ["id" => $contract->orderproduct->order_id])?>">#<?=$contract->orderproduct->order_id?></a> erstellt
|
||||
<?php elseif($j->value == "productchange"): ?>
|
||||
<em>Vertrag erstellt: <?=nl2br(htmlentities($j->text))?>
|
||||
<?php endif; ?>
|
||||
@@ -454,5 +454,33 @@
|
||||
$("#truncated-" + id).toggle();
|
||||
$("#fulltext-" + id).toggle();
|
||||
}
|
||||
|
||||
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
|
||||
event.preventDefault();
|
||||
$(this).ekkoLightbox({
|
||||
alwaysShowClose: true,
|
||||
showArrows: false
|
||||
});
|
||||
});
|
||||
|
||||
function downloadImage(image_id) {
|
||||
event.preventDefault();
|
||||
location.href="<?=self::getUrl("File", "download")?>?id=" + image_id;
|
||||
}
|
||||
|
||||
function toggleGallery() {
|
||||
$("#ticketfile-body").toggle();
|
||||
|
||||
if($("#ticketfile-body").is(":hidden")) {
|
||||
console.log("is hidden");
|
||||
$("#gallery-toggle-button").removeClass("fa-caret-down");
|
||||
$("#gallery-toggle-button").addClass("fa-caret-right");
|
||||
} else {
|
||||
console.log("is not hidden");
|
||||
$("#gallery-toggle-button").removeClass("fa-caret-right");
|
||||
$("#gallery-toggle-button").addClass("fa-caret-down");
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
<?php include(realpath(dirname(__FILE__)."/../../$mfLayoutPackage")."/footer.php"); ?>
|
||||
@@ -79,13 +79,12 @@
|
||||
<div class="card">
|
||||
<div class="card-body mb-3">
|
||||
|
||||
<form method="post" action="<?=self::getUrl("Contractqueue", "commit")?>">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="float-left">
|
||||
<h4 class="header-title">Fertiggestellte Bestellungen</h4>
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-fw fa-check"></i> Markierte Elemente als Contract übernehmen</button>
|
||||
</div>
|
||||
<div class="float-right">
|
||||
<a class="btn btn-outline-primary mb-2" href="<?=self::getUrl("Contractqueue", "importFinishedOrders")?>"><i class="fas fa-fw fa-file-import"></i> Fertiggestellte Bestellungen importieren</a>
|
||||
@@ -243,7 +242,6 @@
|
||||
<h5>Produkte</h5>
|
||||
<table class="table table-striped table-hover" id="order-products-<?=$order_id?>">
|
||||
<tr>
|
||||
<th style="width:56px;"><input type="checkbox" class="form-control pointer checkbox-toggle" onclick="toggleOrderApproval(this, <?=$order_id?>, 'order')" /></th>
|
||||
<th>Produkt</th>
|
||||
<th>Matchcode</th>
|
||||
<th>Preis</th>
|
||||
@@ -257,7 +255,6 @@
|
||||
|
||||
<?php foreach($contracts as $contract): ?>
|
||||
<tr id="contract-<?=$contract->id?>">
|
||||
<td><input type="checkbox" class="form-control pointer" value="<?=$contract->id?>" id="approve-order-<?=$order_id?>-contract-<?=$contract->id?>" onclick="toggleApproval(<?=$order_id?>, 'order')" <?=($contract->approved) ? "checked='checked'" : ""?> /></td>
|
||||
<td class="text-wrap product">
|
||||
<div class="text">
|
||||
<!--i class="fas fa-fw fa-pencil pointer text-primary" onclick="toggleEdit('contract', <?=$contract->id?>, 'product')"></i--> <span class="value"><?=$contract->product_name?></span>
|
||||
@@ -371,7 +368,6 @@
|
||||
<h5>Gutschriften / Provisionen</h5>
|
||||
<table class="table table-striped table-hover" id="credit-products-<?=$order_id?>">
|
||||
<tr>
|
||||
<th style="width:56px;"><input type="checkbox" class="form-control pointer checkbox-toggle" onclick="toggleOrderApproval(this, <?=$order_id?>, 'credit')" /></th>
|
||||
<th>Bezieher</th>
|
||||
<th>Produkt</th>
|
||||
<th>Matchcode</th>
|
||||
@@ -386,7 +382,6 @@
|
||||
<?php foreach($contracts as $contract): ?>
|
||||
<?php $credit = $contract->getCredit(); if(!$credit) continue; ?>
|
||||
<tr id="credit-<?=$contract->id?>">
|
||||
<td><input type="checkbox" class="form-control pointer" value="<?=$contract->id?>" id="approve-credit-<?=$order_id?>-contract-<?=$contract->id?>" onclick="toggleApproval(<?=$order_id?>, 'credit')" <?=($contract->approved_credit) ? "checked='checked'" : ""?> /></td>
|
||||
<td class="crediting_partner_name text value"><?=($credit["partner"]) ? $credit["partner"]->getCompanyOrName() : ""?></td>
|
||||
<td class="text-wrap product text">
|
||||
<span class="value"><?=$contract->product_name?></span>
|
||||
@@ -427,7 +422,10 @@
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
|
||||
<form method="post" action="<?=self::getUrl("Contractqueue", "commitOrder")?>">
|
||||
<input type="hidden" name="order_id" value="<?=$contract->order_id?>" />
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-fw fa-check"></i> Produkte dieser Bestellung als Contract übernehmen</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -443,8 +441,6 @@
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination-summary.php"); ?>
|
||||
<?php include(realpath(dirname(__FILE__)."/../")."/tpl/pagination.php"); ?>
|
||||
|
||||
<button type="submit" class="btn btn-primary"><i class="fas fa-fw fa-check"></i> Markierte Elemente als Contract übernehmen</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user