|
@@ -1,7 +1,7 @@
|
|
<?php
|
|
<?php
|
|
$orderDetailJson = $order->detailJson();
|
|
$orderDetailJson = $order->detailJson();
|
|
$orderSelectedOptions = json_decode(@$orderDetailJson->selected_options ?? '{}');
|
|
$orderSelectedOptions = json_decode(@$orderDetailJson->selected_options ?? '{}');
|
|
- $selectedOptionsSummary = @$orderSelectedOptions->selectedOptionsSummary ?? (object) [];
|
|
|
|
|
|
+ $orderSummary = $order->getOrderAllTestsRequested();
|
|
?>
|
|
?>
|
|
|
|
|
|
<tr>
|
|
<tr>
|
|
@@ -9,7 +9,6 @@
|
|
<table border="0" cellpadding="0" cellspacing="0"
|
|
<table border="0" cellpadding="0" cellspacing="0"
|
|
style="border-collapse:collapse;border-spacing:0;width:100%;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif">
|
|
style="border-collapse:collapse;border-spacing:0;width:100%;color:rgb(51,51,51);font-family:'Helvetica Neue',Helvetica,Arial,sans-serif">
|
|
<tbody>
|
|
<tbody>
|
|
- @if(!@$isChildOrder)
|
|
|
|
<tr height="24" style="background-color:rgb(250,250,250)">
|
|
<tr height="24" style="background-color:rgb(250,250,250)">
|
|
<td colspan="5" valign="top"
|
|
<td colspan="5" valign="top"
|
|
style="text-align:center;text-transform:uppercase;padding:10px;border-top-left-radius:3px;border-bottom-left-radius:3px">
|
|
style="text-align:center;text-transform:uppercase;padding:10px;border-top-left-radius:3px;border-bottom-left-radius:3px">
|
|
@@ -40,19 +39,54 @@
|
|
<tr height="15">
|
|
<tr height="15">
|
|
<td colspan="5"></td>
|
|
<td colspan="5"></td>
|
|
</tr>
|
|
</tr>
|
|
- @endif
|
|
|
|
- @foreach ($selectedOptionsSummary as $tkey => $test)
|
|
|
|
|
|
+ @foreach ($orderSummary['all_tests'] as $tkey => $test)
|
|
<tr>
|
|
<tr>
|
|
<td colspan="3" style="padding:0 0 0 0;vertical-align:top;">
|
|
<td colspan="3" style="padding:0 0 0 0;vertical-align:top;">
|
|
<span
|
|
<span
|
|
- style="font-weight:400;">{{ $test->name }}</span>
|
|
|
|
|
|
+ style="font-weight:400;">{{ $test['name'] }}</span>
|
|
</td>
|
|
</td>
|
|
<td align="right" valign="top" style="padding:0 0px;">
|
|
<td align="right" valign="top" style="padding:0 0px;">
|
|
<span
|
|
<span
|
|
- style="font-weight:400;white-space:nowrap;display:block;">${{ number_format($test->price, 2) }}</span>
|
|
|
|
|
|
+ style="font-weight:400;white-space:nowrap;display:block;">${{ number_format($test['price'], 2) }}</span>
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
@endforeach
|
|
@endforeach
|
|
|
|
+
|
|
|
|
+ @if (@$orderSelectedOptions->partner == 1)
|
|
|
|
+ <tr height="15">
|
|
|
|
+ <td colspan="5"></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr height="24" style="background-color:rgb(250,250,250)">
|
|
|
|
+ <td colspan="5" valign="top"
|
|
|
|
+ style="text-align:center;text-transform:uppercase;padding:6px;border-top-left-radius:3px;border-bottom-left-radius:3px">
|
|
|
|
+ <span style="font-size:15px;font-weight:600">Partner Tests</span></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr height="15">
|
|
|
|
+ <td colspan="5"></td>
|
|
|
|
+ </tr>
|
|
|
|
+ <?php
|
|
|
|
+ $discountedAmountPerOrder = floatval($orderSummary['partner_discount_per_test']);
|
|
|
|
+ $partnerDiscount = 0;
|
|
|
|
+ $partnerTotalCost = 0;
|
|
|
|
+ ?>
|
|
|
|
+ @foreach ($orderSummary['all_tests'] as $pTestKey => $pTest)
|
|
|
|
+ <?php
|
|
|
|
+ $partnerDiscount = $partnerDiscount + $discountedAmountPerOrder;
|
|
|
|
+ $pTestAmount = floatval($pTest['price']) - $discountedAmountPerOrder;
|
|
|
|
+ $partnerTotalCost = $partnerTotalCost + floatval($pTestAmount);
|
|
|
|
+ ?>
|
|
|
|
+ <tr>
|
|
|
|
+ <td colspan="3" style="padding:0 0 0 0;vertical-align:top;">
|
|
|
|
+ <span
|
|
|
|
+ style="font-weight:400;">{{ $pTest['name'] }}</span>
|
|
|
|
+ </td>
|
|
|
|
+ <td align="right" valign="top" style="padding:0 0px;">
|
|
|
|
+ <span
|
|
|
|
+ style="font-weight:400;white-space:nowrap;display:block;">${{ number_format($pTestAmount, 2) }}</span>
|
|
|
|
+ </td>
|
|
|
|
+ </tr>
|
|
|
|
+ @endforeach
|
|
|
|
+ @endif
|
|
</tbody>
|
|
</tbody>
|
|
</table>
|
|
</table>
|
|
</td>
|
|
</td>
|
|
@@ -84,32 +118,32 @@
|
|
<tr height="28">
|
|
<tr height="28">
|
|
<td align="right"
|
|
<td align="right"
|
|
style="color:#000;font-size:14px;font-weight:400;padding:0 30px 0 0;border:none;border-width:1px;border-color:rgb(238,238,238)">
|
|
style="color:#000;font-size:14px;font-weight:400;padding:0 30px 0 0;border:none;border-width:1px;border-color:rgb(238,238,238)">
|
|
- Partner</td>
|
|
|
|
|
|
+ Partner Total</td>
|
|
<td width="1" style="background-color:rgb(238,238,238);width:1px"></td>
|
|
<td width="1" style="background-color:rgb(238,238,238);width:1px"></td>
|
|
<td width="90" align="right"
|
|
<td width="90" align="right"
|
|
style="width:120px;font-size:16px;font-weight:400;white-space:nowrap">
|
|
style="width:120px;font-size:16px;font-weight:400;white-space:nowrap">
|
|
- ${{ number_format(@$orderSelectedOptions->partner_test_total, 2) }}
|
|
|
|
|
|
+ ${{ number_format(@$partnerTotalCost, 2) }}
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
<tr height="28">
|
|
<tr height="28">
|
|
<td align="right"
|
|
<td align="right"
|
|
style="color:#048a16;font-size:14px;font-weight:400;padding:0 30px 0 0;border:none;border-width:1px;border-color:rgb(238,238,238)">
|
|
style="color:#048a16;font-size:14px;font-weight:400;padding:0 30px 0 0;border:none;border-width:1px;border-color:rgb(238,238,238)">
|
|
- Discount</td>
|
|
|
|
|
|
+ Partner Discount</td>
|
|
<td width="1" style="background-color:rgb(238,238,238);width:1px"></td>
|
|
<td width="1" style="background-color:rgb(238,238,238);width:1px"></td>
|
|
<td width="90" align="right"
|
|
<td width="90" align="right"
|
|
style="width:120px;font-size:16px;font-weight:400; color:#048a16;white-space:nowrap">
|
|
style="width:120px;font-size:16px;font-weight:400; color:#048a16;white-space:nowrap">
|
|
- -${{ number_format(@$orderSelectedOptions->partner_test_discount_amount, 2) }}
|
|
|
|
|
|
+ -${{ number_format(@$partnerDiscount, 2) }}
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
@endif
|
|
@endif
|
|
<tr height="28">
|
|
<tr height="28">
|
|
<td align="right"
|
|
<td align="right"
|
|
style="color:#000;font-size:14px;font-weight:600;padding:0 30px 0 0;border:none;border-width:1px;border-color:rgb(238,238,238)">
|
|
style="color:#000;font-size:14px;font-weight:600;padding:0 30px 0 0;border:none;border-width:1px;border-color:rgb(238,238,238)">
|
|
- SUB-TOTAL</td>
|
|
|
|
|
|
+ TOTAL</td>
|
|
<td width="1" style="background-color:rgb(238,238,238);width:1px"></td>
|
|
<td width="1" style="background-color:rgb(238,238,238);width:1px"></td>
|
|
<td width="90" align="right"
|
|
<td width="90" align="right"
|
|
style="width:120px;font-size:16px;font-weight:600;white-space:nowrap">
|
|
style="width:120px;font-size:16px;font-weight:600;white-space:nowrap">
|
|
- ${{ number_format($order->order_total, 2) }}
|
|
|
|
|
|
+ ${{ number_format(@$orderSummary['final_total'], 2) }}
|
|
</td>
|
|
</td>
|
|
</tr>
|
|
</tr>
|
|
<tr height="10">
|
|
<tr height="10">
|