convert recieptpdf

This commit is contained in:
Russ Long 2018-12-29 14:09:40 -05:00
parent f986fbf937
commit 57f392ef3f
3 changed files with 22 additions and 13 deletions

View File

@ -216,8 +216,15 @@ class PagesController extends Controller
$checkout_final_results = Checkout::where('checkout_id', '=', $checkoutid)
->first();
$bidder_num = $checkout_final_results->bidder_num;
$checkout_list_results = WinningBids::with('items_rel')
->where('winning_bidder_num', '=', $bidder_num)
$checkout_list_results = DB::select("SELECT
*, items.item_assigned_num, items.item_desc
FROM winning_bids
INNER JOIN items AS items
ON winning_bids.winning_item_num=items.iditems
WHERE winning_bidder_num = $bidder_num
");
WinningBids::with('items')
->where('winning_bidder_num', '=', '$bidder_num')
->get();
$checkout_info_results = DB::select("SELECT
winning_bids.*,

View File

@ -20,7 +20,7 @@ class WinningBids extends Model
'updated_at'
];
public function items_rel()
public function items()
{
return $this->hasMany('App\Models\Items', 'iditems', 'winning_item_num');
}

View File

@ -84,10 +84,10 @@
@foreach($checkout_list_results as $checkout_list_result)
<tr>
<td>
{{ $checkout_list_result->items_rel->first()->item_assigned_num }}
{{ $checkout_list_result->item_assigned_num }}
</td>
<td>
{{ $checkout_list_result->items_rel->first()->item_desc }}
{{ $checkout_list_result->item_desc }}
</td>
<td>
${{ $checkout_list_result->winning_cost }}
@ -108,19 +108,21 @@
</h4>
</th>
<th>
@if($checkout_final_results->payment_method==1)
@foreach($checkout_final_results as $checkout_final_result)
@if($checkout_final_result->payment_method==1)
<h4>
CASH
</h4>
@elseif($checkout_final_results->payment_method==2)
@elseif($checkout_final_result->payment_method==2)
<h4>
CHECK Number {{ $checkout_final_results->check_number }}
CHECK Number {{ $checkout_final_result->check_number }}
</h4>
@else
<h4>
CREDIT {{ $checkout_final_results->cc_transaction }}
CREDIT {{ $checkout_final_result->cc_transaction }}
</h4>
@endif
@endforeach
</th>
</tr>
</table>
@ -179,13 +181,13 @@
@foreach($checkout_list_results as $checkout_list_result)
<tr>
<td>
{{ $checkout_list_result->items_rel->first()->item_assigned_num }}
{{ $checkout_list_result->item_assigned_num }}
</td>
<td>
{{ $checkout_list_result->items_rel->first()->item_desc }}
{{ $checkout_list_result->item_desc }}
</td>
<td>
${{ $checkout_list_result->items->winning_cost }}
${{ $checkout_list_result->winning_cost }}
</td>
<td>
</td>