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
{
public static function BidderShowNumbers()
public static function bidderShowNumbers()
{
$bidder_num_results = Bidders::orderBy('bidder_assigned_number')
->get();
$bidder_num = '<option disabled selected hidden value="">choose...</option>';
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;
}

View File

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

View File

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

View File

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

View File

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

View File

@ -11,17 +11,30 @@ use App\Models\WinningBids;
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')
->orderBy('bidders.bidder_assigned_number')
->get();
$winning_bidder_num = '<option disabled selected hidden value="">choose...</option>';
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;
}

View File

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

View File

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

View File

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

View File

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

View File

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