155 lines
8.1 KiB
PHP
155 lines
8.1 KiB
PHP
<div class="bootstrap-iso">
|
|
<h2 class="mt-3 mb-3 text-center"> <?php p($l->t('Quote'));?>
|
|
<div id="devisid" style="display:inline" class="editable" data-table="devis" data-column="num" data-id="<?php echo $_['devis'][0]->devisid; ?>">sur le defunt <?php echo $_['devis'][0]->nom_defunt; ?></div>
|
|
<span data-html2canvas-ignore>(</span> <div data-html2canvas-ignore id="devisversion" style="display:inline" data-table="devis" data-column="version" data-id="<?php echo $_['devis'][0]->id; ?>"><?php echo $_['devis'][0]->lieu; ?>)</div>
|
|
</h2>
|
|
<hr />
|
|
<div class="row">
|
|
<div class="col-5 h-100 m-0" style="min-height:250px;">
|
|
|
|
<?php $res = json_decode($_['configuration'])[0]; ?>
|
|
<h5 class="p-3 m-0 text-dark text-center border border-2 border-dark"><?php p($l->t('FROM'));?> <?php echo $res->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 $res->prenom . " " . $res->nom; ?><br />
|
|
<?php echo $res->adresse; ?><br />
|
|
<?php echo $res->mail; ?><br />
|
|
<?php echo $res->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 id="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 id="nomprenom" data-id="0" data-table="devis" data-column="id_client"></span><br />
|
|
<span id="adresse"></span><br />
|
|
<span id="mail"></span><br />
|
|
<span id="telephone"></span><br />
|
|
<span id="legal_one"></span><br />
|
|
<span id="dateContext" class="d-none"></span>
|
|
<span id="nomcli" class="d-none"></span>
|
|
<span id="idcli" class="d-none"></span>
|
|
<span id="etp" class="d-none"></span>
|
|
<span id="lieusoin" class="d-none"><?php echo $_['devis'][0]->lieu; ?></span>
|
|
<span id="nomdefunt" class="d-none"><?php echo $_['devis'][0]->nom_defunt;?></span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col col-md">
|
|
<hr />
|
|
<div class="col col-xl mb-3 text-center"><b><span><?php p($l->t('Offer valid for 1 month from'));?> : </span><span><?php echo (new DateTime($_['devis'][0]->date))->format('d-m-Y'); ?></span></b></div>
|
|
<hr />
|
|
</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($_['devis'][0]->date))->format('d-m-Y');?></b>,</span> <span id="devisid" data-id=<?php echo $_['devis'][0]->devisid;?>>Défunt associé : <b><?php echo $_['devis'][0]->nom_defunt;?></b></span><br/>
|
|
<span>Lieu : <b><?php echo $_['devis'][0]->lieu;?> (<?php echo $_['devis'][0]->adresse_soin;?>)</b>
|
|
</div>
|
|
<hr/>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col col-md">
|
|
<label class="fw-bold">Commande :</label>
|
|
<div class="col col-xl mb-3 text-center editable"
|
|
style="display:inline"
|
|
data-table="devis" data-column="order_number"
|
|
data-id="<?php echo $_['devis'][0]->devisid;?>">
|
|
<?php echo ($_['devis'][0]->order_number == "" ) ? "-" : $_['devis'][0]->order_number ; ?>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="row">
|
|
<div class="col col-md">
|
|
<label class="fw-bold">Numéro de dossier :</label>
|
|
<div class="col col-xl mb-3 text-center editable"
|
|
style="display:inline"
|
|
data-table="devis" data-column="case_number"
|
|
data-id="<?php echo $_['devis'][0]->devisid;?>">
|
|
<?php echo ($_['devis'][0]->case_number == "" ) ? "-" : $_['devis'][0]->case_number ; ?>
|
|
</div>
|
|
</div>
|
|
<hr />
|
|
</div>
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div><h2>Articles</h2></div>
|
|
<button id="devisAdd" type="button" class="mb-2 btn btn-outline-success" data-html2canvas-ignore>Ajouter article</button>
|
|
</div>
|
|
<hr>
|
|
<div class="table-responsive">
|
|
<table id="produits" 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('Comment'));?></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>
|
|
<div class="d-flex justify-content-between align-items-center">
|
|
<div><h2>Produits</h2></div>
|
|
<button id="devisAddProduit" type="button" class="mb-2 btn btn-outline-success" data-html2canvas-ignore>Ajouter produit</button>
|
|
</div>
|
|
<hr>
|
|
<div class="table-responsive">
|
|
<table id="articles" 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('Comment'));?></th>
|
|
<th><?php p($l->t('Quantity'));?>(ml)</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="exportDevisToPdf" type="button" class="mb-2 btn btn-outline-success"><?php p($l->t('Save in Nextcloud'));?></button>
|
|
<button id="mailGestion" type="button" class="mb-2 btn btn-outline-success sendmail" data-html2canvas-ignore data-name=""><?php p($l->t('Send by email'));?></button>
|
|
</div>
|
|
<div class="mt-0 table-responsive">
|
|
<table id="totaldevis" 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 $res->entreprise; ?><br /><?php echo $res->adresse; ?><br /><?php echo $res->legal_one; ?><br/><?php echo $res->legal_two; ?></p>
|
|
</div>
|
|
</div>
|