Button to create Order from Preorder

This commit is contained in:
Frank Schubert
2026-01-19 16:29:22 +01:00
parent d3f35a4cd8
commit 4e4c5a9c18
10 changed files with 254 additions and 17 deletions

View File

@@ -437,7 +437,7 @@
<div class="form-group row">
<label class="col-lg-2 col-form-label" for="order_date">Bestelldatum</label>
<div class="col-lg-4">
<input type="text" class="form-control" name="order_date" id="order_date" value="<?=($order->order_date) ? date("d.m.Y", $order->order_date) : ""?>" />
<input type="text" class="form-control" name="order_date" id="order_date" value="<?=(is_numeric($order->order_date)) ? date("d.m.Y", $order->order_date) : $order->order_date ?>" />
</div>
</div>
<div class="form-group row">
@@ -553,7 +553,6 @@
</div>
</div>
<div class="card">
<div class="card-body" id="products-form">
<h4>Produkte</h4>
@@ -585,6 +584,12 @@
<div class="row product-container" id="position-<?=$i?>">
<input type="hidden" name="products[<?=$i?>][delete]" id="products-<?=$i?>-delete" value="0" />
<input type="hidden" name="products[<?=$i?>][orderproduct_id]" value="<?=$product->id?>" />
<?php if($product->preorder_id): ?>
<input type="hidden" name="products[<?=$i?>][preorder_id]" value="<?=$product->preorder_id?>" />
<?php endif; ?>
<?php if($product->oaid): ?>
<input type="hidden" name="products[<?=$i?>][oaid]" value="<?=$product->oaid?>" />
<?php endif; ?>
<div class="col-md-1 product-<?=$i?>">
<div class="row">
<div class="col-md-12">
@@ -596,9 +601,11 @@
</div>
</div>
<div class="row">
<div class="col-md-12 delete-button-container">
<?php if(!$product->preorder_id): ?>
<div class="col-md-12 delete-button-container">
<a href="#" class="btn btn-xl btn-outline-danger" onclick="toggleDeletePos(<?=$i?>); return false;"><i class="fas fa-fw fa-trash-can fa-xl pointer"></i></a>
</div>
</div>
<?php endif; ?>
</div>
</div>