This commit is contained in:
Russ Long 2018-12-23 11:01:06 -05:00
parent cf603f09b5
commit c171fb529a
11 changed files with 54 additions and 19 deletions

View File

@ -7,13 +7,21 @@ use App\Models\Bidders;
class BidderSelectList class BidderSelectList
{ {
public static function BidderShowNumbers() public static function bidderShowNumbers()
{ {
$bidder_num_results = Bidders::orderBy('bidder_assigned_number') $bidder_num_results = Bidders::orderBy('bidder_assigned_number')
->get(); ->get();
$bidder_num = '<option disabled selected hidden value="">choose...</option>'; $bidder_num = '<option disabled selected hidden value="">choose...</option>';
foreach ($bidder_num_results as $bidder_num_result) { foreach ($bidder_num_results as $bidder_num_result) {
$bidder_num .= '<option value="' . $bidder_num_result->idbidders . '">' . $bidder_num_result->bidder_assigned_number . ' - ' . $bidder_num_result->bidder_fname . ' ' . $bidder_num_result->bidder_lname .'</option>'; $bidder_num .= '<option value="' .
$bidder_num_result->idbidders .
'">' .
$bidder_num_result->bidder_assigned_number .
' - ' .
$bidder_num_result->bidder_fname .
' ' .
$bidder_num_result->bidder_lname .
'</option>';
} }
return $bidder_num; return $bidder_num;
} }

View File

@ -7,7 +7,7 @@ use App\Models\Checkout;
class CheckoutBidderSelectList class CheckoutBidderSelectList
{ {
public static function CheckoutBidderShowNumbers() public static function checkoutBidderShowNumbers()
{ {
$checkout_bidder_num_results = Checkout::join('bidders', 'checkout.bidder_num', '=', 'bidders.idbidders') $checkout_bidder_num_results = Checkout::join('bidders', 'checkout.bidder_num', '=', 'bidders.idbidders')
->orderBy('bidders.bidder_assigned_number', 'asc') ->orderBy('bidders.bidder_assigned_number', 'asc')

View File

@ -7,13 +7,17 @@ use App\Models\Items;
class ItemSelectList class ItemSelectList
{ {
public static function ItemShowNumbers() public static function itemShowNumbers()
{ {
$item_num_results = Items::orderBy('item_assigned_num') $item_num_results = Items::orderBy('item_assigned_num')
->get(); ->get();
$item_nums = '<option disabled="disabled" selected="selected" value="0">choose...</option>'; $item_nums = '<option disabled="disabled" selected="selected" value="0">choose...</option>';
foreach ($item_num_results as $item_num_result) { foreach ($item_num_results as $item_num_result) {
$item_nums .= '<option value="' . $item_num_result->iditems . '">' . $item_num_result->item_assigned_num . '</option>'; $item_nums .= '<option value="' .
$item_num_result->iditems .
'">' .
$item_num_result->item_assigned_num .
'</option>';
} }
return $item_nums; return $item_nums;
} }

View File

@ -11,13 +11,17 @@ use App\Models\WinningBids;
class PaymentMethodSelectList class PaymentMethodSelectList
{ {
public static function PaymentShowMethods() public static function paymentShowMethods()
{ {
$payment_method_results = PaymentMethods::orderBy('pm_name') $payment_method_results = PaymentMethods::orderBy('pm_name')
->get(); ->get();
$payment_methods = '<option disabled="disabled" selected="selected" value="0">choose...</option>'; $payment_methods = '<option disabled="disabled" selected="selected" value="0">choose...</option>';
foreach ($payment_method_results as $payment_method_result) { foreach ($payment_method_results as $payment_method_result) {
$payment_methods .= '<option value="' . $payment_method_result->pm_id . '">' . $payment_method_result->pm_name . '</option>'; $payment_methods .= '<option value="' .
$payment_method_result->pm_id .
'">' .
$payment_method_result->pm_name .
'</option>';
} }
return $payment_methods; return $payment_methods;
} }

View File

@ -11,14 +11,20 @@ use App\Models\WinningBids;
class WinningBidSelectList class WinningBidSelectList
{ {
public static function WinningBidShowNumbers() public static function winningBidShowNumbers()
{ {
$winning_bid_num_results = WinningBids::join('items', 'winning_bids.winning_item_num', '=', 'items.iditems') $winning_bid_num_results = WinningBids::join('items', 'winning_bids.winning_item_num', '=', 'items.iditems')
->orderBy('items.item_assigned_num') ->orderBy('items.item_assigned_num')
->get(); ->get();
$winning_bid_num = '<option disabled selected hidden value="">choose...</option>'; $winning_bid_num = '<option disabled selected hidden value="">choose...</option>';
foreach ($winning_bid_num_results as $winning_bid_num_result) { foreach ($winning_bid_num_results as $winning_bid_num_result) {
$winning_bid_num .= '<option value="' . $winning_bid_num_result->idwinning_bids . '">' . $winning_bid_num_result->item_assigned_num . ' - ' . $winning_bid_num_result->item_desc .'</option>'; $winning_bid_num .= '<option value="' .
$winning_bid_num_result->idwinning_bids .
'">' .
$winning_bid_num_result->item_assigned_num .
' - ' .
$winning_bid_num_result->item_desc .
'</option>';
} }
return $winning_bid_num; return $winning_bid_num;
} }

View File

@ -11,17 +11,30 @@ use App\Models\WinningBids;
class WinningBidderSelectList class WinningBidderSelectList
{ {
public static function WinningBidderShowNumbers() public static function winningBidderShowNumbers()
{ {
$winning_bidder_num_results = WinningBids::join('bidders', 'winning_bids.winning_bidder_num', '=', 'bidders.idbidders') $winning_bidder_num_results = WinningBids::join(
'bidders',
'winning_bids.winning_bidder_num',
'=',
'bidders.idbidders'
)
->groupBy('winning_bidder_num') ->groupBy('winning_bidder_num')
->orderBy('bidders.bidder_assigned_number') ->orderBy('bidders.bidder_assigned_number')
->get(); ->get();
$winning_bidder_num = '<option disabled selected hidden value="">choose...</option>'; $winning_bidder_num = '<option disabled selected hidden value="">choose...</option>';
foreach ($winning_bidder_num_results as $winning_bidder_num_result) { foreach ($winning_bidder_num_results as $winning_bidder_num_result) {
$winning_bidder_num .= '<option value="' . $winning_bidder_num_result->idbidders . '">' . $winning_bidder_num_result->bidder_assigned_number . ' - ' . $winning_bidder_num_result->bidder_fname . ' ' . $winning_bidder_num_result->bidder_lname .'</option>'; $winning_bidder_num .= '<option value="' .
$winning_bidder_num_result->idbidders .
'">' .
$winning_bidder_num_result->bidder_assigned_number .
' - ' .
$winning_bidder_num_result->bidder_fname .
' ' .
$winning_bidder_num_result->bidder_lname .
'</option>';
} }
return $winning_bidder_num; return $winning_bidder_num;
} }

View File

@ -16,7 +16,7 @@
</label> </label>
<div class=col-sm-4> <div class=col-sm-4>
<select name="checkoutbiddernum" id="checkoutbiddernum" required class=form-control> <select name="checkoutbiddernum" id="checkoutbiddernum" required class=form-control>
<?php echo App\Helpers\WinningBidderSelectList::WinningBidderShowNumbers(); ?> <?php echo App\Helpers\WinningBidderSelectList::winningBidderShowNumbers(); ?>
</select> </select>
</div> </div>
</div> </div>

View File

@ -15,7 +15,7 @@
</label> </label>
<div class=col-sm-2> <div class=col-sm-2>
<select name="winid" id="winid" required class=form-control> <select name="winid" id="winid" required class=form-control>
<?php echo App\Helpers\WinningBidSelectList::WinningBidShowNumbers(); ?> <?php echo App\Helpers\WinningBidSelectList::winningBidShowNumbers(); ?>
</select> </select>
</div> </div>
</div> </div>
@ -25,7 +25,7 @@
</label> </label>
<div class=col-sm-2> <div class=col-sm-2>
<select name="winnerbiddernum" id="winnerbiddernum" required class=form-control> <select name="winnerbiddernum" id="winnerbiddernum" required class=form-control>
<?php echo App\Helpers\BidderSelectList::BidderShowNumbers(); ?> <?php echo App\Helpers\BidderSelectList::bidderShowNumbers(); ?>
</select> </select>
</div> </div>
</div> </div>

View File

@ -16,7 +16,7 @@
</label> </label>
<div class=col-sm-4> <div class=col-sm-4>
<select name="reprintbiddernum" id="checkoutbiddernum" required class=form-control> <select name="reprintbiddernum" id="checkoutbiddernum" required class=form-control>
<?php echo App\Helpers\CheckoutBidderSelectList::CheckoutBidderShowNumbers(); ?> <?php echo App\Helpers\CheckoutBidderSelectList::checkoutBidderShowNumbers(); ?>
</select> </select>
</div> </div>
</div> </div>

View File

@ -16,7 +16,7 @@
</label> </label>
<div class=col-sm-2> <div class=col-sm-2>
<select name="winneritemnum" id="winneritemnum" required class=form-control> <select name="winneritemnum" id="winneritemnum" required class=form-control>
<?php echo App\Helpers\ItemSelectList::ItemShowNumbers(); ?> <?php echo App\Helpers\ItemSelectList::itemShowNumbers(); ?>
</select> </select>
</div> </div>
</div> </div>
@ -26,7 +26,7 @@
</label> </label>
<div class=col-sm-2> <div class=col-sm-2>
<select name="winnerbiddernum" id="winnerbiddernum" required class=form-control> <select name="winnerbiddernum" id="winnerbiddernum" required class=form-control>
<?php echo App\Helpers\BidderSelectList::BidderShowNumbers(); ?> <?php echo App\Helpers\BidderSelectList::bidderShowNumbers(); ?>
</select> </select>
</div> </div>
</div> </div>

View File

@ -16,7 +16,7 @@
</label> </label>
<div class=col-sm-4> <div class=col-sm-4>
<select name="winnerbiddernum" id="winnerbiddernum" required class=form-control> <select name="winnerbiddernum" id="winnerbiddernum" required class=form-control>
<?php echo App\Helpers\BidderSelectList::BidderShowNumbers(); ?> <?php echo App\Helpers\BidderSelectList::bidderShowNumbers(); ?>
</select> </select>
</div> </div>
</div> </div>