Voici votre URL de partage https://sharemycode.io/c/502d06a (Cliquer pour copier) (Copié)

<!doctype html>
<html lang="en">
	<head>
		<!-- Required meta tags -->
		<meta http-equiv="Content-Type" content="text/html charset=utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<style>

			@font-face {
				font-family: 'courier_newregular';
				src: local("Courier New"), url('../../public/assets/css/fonts/CourierNew.ttf') format('truetype');
				font-weight: normal;
				font-style: normal;
			}

			body {
				background: #fff;
				margin-top: 0;
				font-family: "Courier New";
				font-size: 12px;
				padding: 0 25px;
			}
			.header {
				height: 100px;
				text-align: center;
				width: 100%;
			}
			.fw-bold,
			th {
				font-size: 13px;
				font-weight: bold;
			}
			.adr_infos {
				margin-bottom: 40px;
			}
			.align-center {
				text-align: center;
			}
			.align-end {
				text-align: right;
			}
			table {
				border: none;
				border-collapse: collapse;
				margin-top: 15px;
				margin-bottom: 15px;
				width: 100%;
			}
			table th {
				font-size: 12px;
				font-weight: bold;
				background-color: transparent;
				padding: 10px 0;
			}
			table td,
			table th {
				text-align: center;
			}
			.thead_top {
				border-bottom: 1px solid #000;
			}
			table.table-bordered td {
				border: 1px solid #eee;
			}
			.text-start {
				text-align: left;
			}
			.text-end {
				text-align: right;
			}
			.fw-bolder {
				font-weight: bold;
			}
			#sum_section {
				height: 100px;
				margin-top: 18px;
				width: 100%
			}
			.leftside {
				float: left;
				width: 30%
			}
			.rightside {
				float: left;
				text-align: right;
				width: 70%
			}
			.leftside > div,
			.rightside > div {
				margin-bottom: 10px;
			}
			#sum_section:after {
				clear: both;
			}
			.rightside .title {
				padding-right: 8px;
				margin-right: 12px;
			}
			..rightside .title,
			.rightside .prices {
				display: inline-block;
			}
			.rightside table {
				float: right;
				width: 40%;
			}
			.title-2 {
				padding-right: 22px;
				margin-right: 22px;
			}
			#sum_section span {
				margin-top: 0;
				margin-bottom: 0;
				padding-top: 0;
				padding-bottom: 0;
			}
			.currency {
				display: inline-block;
				height: 15px;
				line-height: 18px;
				text-align: right;
				width: 40px;
			}
			.payment {
				height: 50px;
				float: none;
				width: 100%;
			}
			.orders p.title {
				padding-bottom: 18px;
				margin-bottom: 18px;
			}
		</style>
	</head>
	<body>

		<script type="text/php">
			if ( isset($pdf) ) {
				$x = 72;
				$y = 18;
				$text = "{PAGE_NUM} of {PAGE_COUNT}";
				$font = $fontMetrics->get_font("helvetica", "bold");
				$size = 6;
				$color = array(255,0,0);
				$word_space = 0.0;  //  default
				$char_space = 0.0;  //  default
				$angle = 0.0;   //  default
				$pdf->page_text($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle);
			}
		</script>
		{% set langue = app.request.locale %}
		<div class="col-md-12">
			<div class="header">
				<img src="{{imageSrc}}">
			</div>
			<div class="adr_infos">
				<p class="fw-bold">{{ 'ARTHUR_DERUELLE_LIMITED'|trans|upper }}</p>
				<p class="fw-bold">{{ 'CUSTOMER_SERVICE'|trans|upper }}</p>
				<p>{{ 'PHONE'|trans|upper }}</p>
			</div>
			<table>
				<tr>
					<th colspan="2" class="align-center thead_top">{{ 'INVOICE'|trans }}</th>
					<th colspan="2" class="align-center thead_top">{{ order.invoiceNumber }}</th>
					<th colspan="2" class="thead_top">
						{% if langue == 'fr_fr' %}
							{{ orderDate | format_datetime('long', 'short', locale='fr') |replace({'à': "-"}) }}
						{% else %}
							{{ orderDate | format_datetime('long', 'short', locale='en') }}
						{% endif %}
					</th>
					<th colspan="2" class="align-center thead_top">Page   :
					</th>
				</tr>
				<tr>
					<th>{{ 'ARTICLE'|trans|upper }}</th>
					<th>{{ 'DESCRIPTION'|trans|upper }}</th>
					<th>{{ 'QTY'|trans|upper }}</th>
					<th>P.U.H.T</th>
					<th>TVA%</th>
					<th>TVA</th>
					<th>TOTAL H.T</th>
					<th>{{ 'TOTAL'|trans|upper }}</th>
				</tr>
				{% if orderDatas is defined %}
					{% set tva20 = 20 / 100 %}
					{% set totalTva = 0 %}
					{% set totalHT = 0 %}
					{% for od in orderDatas %}
						{% set price_tva = (od.price / 100) * tva20 %}
						{% set totalTva = totalTva + price_tva %}
						{% set totalHT = totalHT + (od.price / 100) %}
						<tr>
							<td class="align-center">
								{{od.ref}}</td>
							<td class="align-center">{{ od.productName | upper}}</td>
							<td class="align-center">1</td>
							<td class="align-end">{{ ((od.price) / 100)|number_format(2, '.', ',') }}</td>
							<td class="align-center">{{ (tva20 * 100) |number_format(2, '.', ',') }}%</td>
							<td class="align-center">{{ price_tva|number_format(2, '.', ',') }}%</td>
							<td class="align-end">{{ (od.price / 100)|number_format(2, '.', ',') }}</td>
							<td class="align-end">{{ ((od.price / 100) + (price_tva / 100))|number_format(2, '.', ',') }}</td>
						</tr>
					{% endfor %}
				{% endif %}
				{% set carrierPriceTva = (order.carrier_price / 100) * tva20 %}
				<tr>
					<td></td>
					<td class="align-center">{{ 'DELIVERY'|trans|upper }}</td>
					<td class="align-center">{{ orderDatas | length }}</td>
					<td class="align-end">{{ (order.carrier_price / 100)|number_format(2, '.', ',') }}</td>
					<td class="align-center">{{ (tva20 * 100) |number_format(2, '.', ',') }}%</td>
					<td class="align-center">{{ carrierPriceTva|number_format(2, '.', ',') }}</td>
					<td class="align-end">{{ (order.carrier_price / 100)|number_format(2, '.', ',') }}</td>
					<td class="align-end">{{ ((order.carrier_price / 100) + ((order.carrier_price / 100) * tva20))|number_format(2, '.', ',') }}</td>
				</tr>
			</table>
			<div id="sum_section">
				<div class="leftside">
					<table>
						<tr>
							<td class="text-start" width="55">{{ 'TVA_TOTAL'|trans|upper }}
								:</td>
							<td class="text-end">{{ (totalTva + carrierPriceTva)|number_format(2, '.', ',') }}</td>
						</tr>
						<tr>
							<td class="text-start" width="55">{{ 'DELIVERY'|trans|upper }}
								:</td>
							<td class="text-end">{{ (order.carrier_price / 100)|number_format(2, '.', ',') }}</td>
						</tr>
					</table>
				</div>
				<div class="rightside">
					{% set total_HT = totalHT + (order.carrier_price / 100) %}
					<table>
						<tr>
							<td class="fw-bolder text-end">{{ 'TOTAL_HT'|trans|upper }}
								:</td>
							<td class="text-end">{{ total_HT|number_format(2, '.', ',') }}
								<span class="currency">EUR</span>
							</td>
						</tr>
						<tr>
							<td class="fw-bolder text-end">{{ 'TOTAL'|trans|upper }}
								:</td>
							<td class="text-end">{{ (total_HT + totalTva + carrierPriceTva)|number_format(2, '.', ',') }}
								<span class="currency">EUR</span>
							</td>
						</tr>
					</table>
				</div>
			</div>
			<div class="payment">
				<div class="payment_section">
					<p class="title fw-bolder">{{ 'Payment'|trans|upper }}</p>
					<p>
						{{ payment.paymentname | upper }}
					</p>
				</div>
			</div>
			<div class="orders">
				<p class="title thead_top">{{ 'Orders'|trans|upper }}
					:
					<span>{{ order.reference | upper }}</span>
				</p>
				<p>
					{% if civility.id == 1 %}
						{{ 'MR'|trans }}
					{% elseif civility.id == 2 %}
						{{ 'MME'|trans }}
					{% else %}
						{{ 'MRS'|trans }}
					{% endif %}
					{{ order.fullname }}
					<br/>
					{{ address.0.addressname2 }}<br/>
					{{ address.0.zipcode }}
					{{ address.0.city }}<br/>
					{{country}}
				</p>
			</div>
		</div>
	</body>
</html>

Informations

Cet extrait a été créé le 30 sept. 2024 à 11:40:23

Cet extrait expire le 30 oct. 2024 à 11:40:23

Langage : twig

Logo twig

Link

Voici votre URL de partage : https://sharemycode.io/c/502d06a Copié