Kaynağa Gözat

Add "Items" column to leads table

Alan Lam 3 yıl önce
ebeveyn
işleme
418e1d6ef3
1 değiştirilmiş dosya ile 10 ekleme ve 10 silme
  1. 10 10
      views/sales_table.php

+ 10 - 10
views/sales_table.php

@@ -10,22 +10,13 @@ $user = $core->getUser();
 
 ?>
 <table class="table table-bordered table-hover mb-3">
-	<colgroup>
-		<col style="width: 1%"/>
-		<col style="width: 15%"/>
-		<col style="width: 35%"/>
-		<col style="width: 10%"/>
-		<col style="width: 10%"/>
-		<col style="width: 15%"/>
-		<col style="width: 15%"/>
-		<col style="width: 1%"/>
-	</colgroup>
 	<thead>
 	<tr>
 		<th><?=htmlspecialchars(__("Ref."))?></th>
 		<th><?=htmlspecialchars(__("Date"))?></th>
 		<th><?=htmlspecialchars(__("Location"))?></th>
 		<th><?=htmlspecialchars(__("Status"))?></th>
+		<th><?=htmlspecialchars(__("Items"))?></th>
 		<th><?=htmlspecialchars(__("Value"))?></th>
 		<th><?=htmlspecialchars(__("Predicted Sold Date"))?></th>
 		<th><?=htmlspecialchars(__("Last Updated"))?></th>
@@ -52,6 +43,15 @@ $user = $core->getUser();
 			<td>
 				<?=htmlspecialchars($sale->getDisplayStatus())?>
 			</td>
+			<td>
+				<?php
+				foreach($sale->getItems() as $item) {
+					?>
+					<?=htmlspecialchars($item->getProduct()->name)?> &times; <?=$item->quantity?><br />
+					<?php
+				}
+				?>
+			</td>
 			<td class="text-end">
 				<?=htmlspecialchars($sale->getDisplayAmount())?>
 			</td>