109 lines
5.7 KiB
PHP
109 lines
5.7 KiB
PHP
<?php
|
|
$order = $_['order'];
|
|
$configuration = $_['configuration'];
|
|
$orderComment = $order->order_comment == null || $order->order_comment == "" ? "-": $order->order_comment;
|
|
?>
|
|
<div class="bootstrap-iso">
|
|
<h2 class="mt-3 mb-3 text-center"> <?php p($l->t('Commande'));?>
|
|
<div id="orderId" style="display:inline" data-id="<?php echo $order->id; ?>">sur le defunt <?php echo $order->defunt_nom; ?></div>
|
|
<span>(</span> <div style="display:inline"><?php echo $order->lieu_nom; ?>)</div>
|
|
</h2>
|
|
<hr />
|
|
<div class="row">
|
|
<div class="col-5 h-100 m-0" style="min-height:250px;">
|
|
<h5 class="p-3 m-0 text-dark text-center border border-2 border-dark"><?php p($l->t('FROM'));?> <?php echo $configuration->entreprise; ?></h5>
|
|
<p style="min-height:180px;" class="p-3 m-0 h-100 text-center text-dark text-center border border-top-0 border-2 border-dark">
|
|
<?php echo $configuration->prenom . " " . $configuration->nom; ?><br />
|
|
<?php echo $configuration->adresse; ?><br />
|
|
<?php echo $configuration->mail; ?><br />
|
|
<?php echo $configuration->telephone; ?><br/>
|
|
<span id="nothing"></span><br />
|
|
</p>
|
|
</div>
|
|
<div class="col-2 h-100 m-0" style="min-height:250px;">
|
|
<?php
|
|
if(isset($_['logo']) && $_['logo'] !== "nothing"){
|
|
echo "<center><a><img alt='".$l->t('Company logo')."' class=\"img-fluid\" src=\"data:image/png;base64, ".$_['logo']."\"/></a></center>";
|
|
}else{
|
|
echo "<span style='font-size:12px' id='Company-logo' data-html2canvas-ignore><b><center>".$l->t('You can add your company logo here.')."</center></b><br/><i>".$l->t('To add a logo, drop the logo.png file in ".gestion" folder at the root of your Nextcloud Files app. Remember to set "Show hidden files".')."</i><br/><br/><center>".$l->t('This message will not appear on generated PDF.')."</center></span>";
|
|
}
|
|
?>
|
|
</div>
|
|
<div class="col-5 h-100 m-0" style="min-height:250px;">
|
|
<h5 class="p-3 m-0 text-dark text-center border border-2 border-dark"><?php p($l->t('TO'));?> <span><?php echo $order->client_entreprise; ?></span></h5>
|
|
<p style="min-height:180px;" class="p-3 m-0 h-100 text-center text-dark text-center border border-top-0 border-2 border-dark">
|
|
<span><?php echo $order->client_prenom . " " . $order->client_nom; ?></span><br/>
|
|
<span><?php echo $order->client_adresse; ?></span><br/>
|
|
<span><?php echo $order->client_mail; ?></span><br/>
|
|
<span><?php echo $order->client_phone; ?></span><br/>
|
|
<span><?php echo $order->client_legal_one; ?></span><br/>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col col-md">
|
|
<div class="col col-xl text-center">
|
|
<span>Date de soin : <b><?php echo (new DateTime($order->order_date))->format('d-m-Y');?></b>,</span> <span>Défunt associé : <b><?php echo $order->defunt_nom;?></b></span><br/>
|
|
<span>Lieu : <b><?php echo $order->lieu_nom;?> (<?php echo $order->lieu_adresse;?>)</b>
|
|
</div>
|
|
</div>
|
|
<hr/>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col col-md">
|
|
<label class="fw-bold">Commentaires :</label>
|
|
<div class="col col-xl mb-3 text-center editable"
|
|
style="display:inline"
|
|
data-table="orders" data-column="order_comment"
|
|
data-id="<?php echo $order->id;?>">
|
|
<?php echo $orderComment; ?>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div><h2>Articles</h2></div>
|
|
<button id="addProductToOrder" type="button" class="mb-2 btn btn-outline-success">Ajouter un article</button>
|
|
</div>
|
|
<hr>
|
|
<div class="table-responsive">
|
|
<table id="orderProducts" class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><?php p($l->t('Reference'));?></th>
|
|
<th><?php p($l->t('Designation'));?></th>
|
|
<th><?php p($l->t('Quantity'));?></th>
|
|
<th><?php p($l->t('Unit price without VAT'));?></th>
|
|
<th><?php p($l->t('Total without VAT'));?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<hr>
|
|
<div>
|
|
<button id="exportOrderToPdf" type="button" class="mb-2 btn btn-outline-success"><?php p($l->t('Save in Nextcloud'));?></button>
|
|
</div>
|
|
<div class="mt-0 table-responsive">
|
|
<table id="totalOrderProducts" class="table table-striped table-xl">
|
|
<thead class="bg-dark text-white">
|
|
<tr>
|
|
<th class="text-center"><?php p($l->t('Total without VAT'));?></th>
|
|
<th class="text-center"><?php p($l->t('VAT Rate'));?></th>
|
|
<th class="text-center"><?php p($l->t('Total VAT'));?></th>
|
|
<th class="text-center"><?php p($l->t('Total Price'));?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="col m-0 pb-0 alert alert-info text-center">
|
|
<p><span id="mentions_default"><?php p($l->t('Please set in global configuration'));?></span></p>
|
|
</div>
|
|
<hr />
|
|
<div class="col m-0 pb-0 alert alert-info text-center">
|
|
<p><?php echo $configuration->entreprise; ?><br /><?php echo $configuration->adresse; ?><br /><?php echo $configuration->legal_one; ?><br/><?php echo $configuration->legal_two; ?></p>
|
|
</div>
|
|
</div>
|