<commit_before><table class="complex-sumup">
	<thead>
		<tr>
			<th>Description</th>
			<th>Qty</th>
			<th>Rate</th>			
			<th>Amount</th>
		</tr>
	</thead>

	<tbody>
		<?php
			$subscriptionList = $this->buildSubscriptionListFromLines($this->lines);
			$endKey = end($subscriptionList);
			foreach ($subscriptionList as $key =>$aggregated) { ?>	
			<tr class="<?php echo ( $endKey === $key ? 'last' : '') ?>">
				<td class='desc'><?php echo ucfirst($aggregated['desc']); ?></td>
				<td class='qty'><?php echo $aggregated['count']; ?></td>
				<td class='rate'><?php echo  number_format( (!empty($aggregated['rate']) ? $aggregated['rate'] : $aggregated['amount']),2) ; ?></td>
				<td class='amount'><?php echo '$' . number_format($aggregated['amount'], 2); ?></td>
			</tr>
		<?php } ?>
			
		<?php foreach ($details_keys as $title => $key) { ?>
			<?php if (empty($data->get('totals')[$key]) || in_array($key,$this->flat_line_types)) { continue; } ?>
			<tr class="<?php echo (end($details_keys) === $key ? 'last' : '') ?>">
				<td colspan="3"><?php echo ucfirst($title); ?></td>
				<td><?php echo '$' . number_format($data->get('totals')[$key]['before_vat'], 2); ?></td>
			</tr>
		<?php } ?>			
		<tr class="total">
			<td colspan="3">SUBTOTAL</td><commit_msg>Hack to remove 002 in the  end of one of the services<commit_after><table class="complex-sumup">
	<thead>
		<tr>
			<th>Description</th>
			<th>Qty</th>
			<th>Rate</th>			
			<th>Amount</th>
		</tr>
	</thead>

	<tbody>
		<?php
			$subscriptionList = $this->buildSubscriptionListFromLines($this->lines);
			$endKey = end($subscriptionList);
			foreach ($subscriptionList as $key =>$aggregated) { ?>	
			<tr class="<?php echo ( $endKey === $key ? 'last' : '') ?>">
				<!-- TODO : Remove this preg_replace code it`s only  here  to fix some issue with the  invoice for HighComm -->
				<td class='desc'><?php echo preg_replace('/january$/','January', preg_replace('/002$/','',ucfirst($aggregated['desc']))); ?></td>
				<td class='qty'><?php echo $aggregated['count']; ?></td>
				<td class='rate'><?php echo  number_format( (!empty($aggregated['rate']) ? $aggregated['rate'] : $aggregated['amount']),2) ; ?></td>
				<td class='amount'><?php echo '$' . number_format($aggregated['amount'], 2); ?></td>
			</tr>
		<?php } ?>
			
		<?php foreach ($details_keys as $title => $key) { ?>
			<?php if (empty($data->get('totals')[$key]) || in_array($key,$this->flat_line_types)) { continue; } ?>
			<tr class="<?php echo (end($details_keys) === $key ? 'last' : '') ?>">
				<td colspan="3"><?php echo ucfirst($title); ?></td>
				<td><?php echo '$' . number_format($data->get('totals')[$key]['before_vat'], 2); ?></td>
			</tr>
		<?php } ?>			
		<tr class="total">
			<td colspan="3">SUBTOTAL</td>
{'fraction_non_alphanumeric': 0.2541696881798405, 'fraction_numerical': 0.005801305293691081, 'mean_word_length': 4.336557059961315, 'pattern_counts': {'":': 0, '<': 96, '<?xml version=': 0, '>': 110, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7654721', 'n_tokens_mistral': 1121, 'n_tokens_neox': 995, 'n_words': 200}