Files
HotLunches/students.display.orders.row.php
T
2026-10-19 15:22:52 -07:00

55 lines
2.7 KiB
PHP

<?php
$time = date("H",time());
$now = date("Y-m-d H:i:s",time());
$orderButtonText = getLanguageText('TEXT-ORDER');
if (isset($order_button_text) && strlen($order_button_text)) $orderButtonText = $order_button_text;
$orderButtonText = str_replace(' ','&nbsp;',$orderButtonText);
?>
<tr class='<?php echo($l_bgclass) ?>'>
<td align='left' valign='top' width='300'><?php echo($schedule_name) ?></td>
<?php if ($schedule_prices != 'N' || $order_subtotal > 0) { ?>
<td width='70' align='right' valign='top'><?php echo($currencySymbol . number_format($order_subtotal,2)) ?></td>
<?php } else { ?>
<td width='70' align='center' valign='top'>--</td>
<?php } ?>
<?php if ($displayDiscounts) { ?>
<td width='70' align='right' valign='top'><?php echo($currencySymbol . number_format($discount_amount,2)) ?></td>
<?php } ?>
<?php if ($schedule_prices != 'N') { ?>
<td width='70' align='right' valign='top'><?php echo($currencySymbol . number_format($order_total,2)) ?></td>
<td width='70' align='center' valign='top'><?php echo($status) ?></td>
<?php } else { ?>
<?php if ($status != 'No Order') $status = "--"; ?>
<td width='70' align='center' valign='top'>--</td>
<td width='70' align='center' valign='top'><?php echo($status) ?></td>
<?php } ?>
<td align='center' valign='top'>
<table cellpadding='1'>
<tr>
<td align='center'>
<table>
<tr>
<?php if (isset($order_num) || $end_order_datetime > $now) { ?>
<td align='center'><a href='?action=orders&naction=edit&schedule_num=<?php echo($schedule_num) ?>&student_num=<?php echo($student_num) ?>&entered_order_num=<?php echo($order_num) ?>' class='btn btn--primary btn--xsmall'><?php echo($orderButtonText) ?></a></td>
<?php } else { ?>
<td align='center'><?php displayLanguageText('TEXT-NOT-AVAILABLE'); ?></td>
<?php } ?>
<?php // if (isset($order_num) && in_array($_SESSION['UserInfo']['type'],array('SuperUser','System Administrator','Application Administrator'))) { ?>
<?php if (isset($order_num) && in_array($_SESSION['UserInfo']['type'],array('SuperUser'))) { ?>
<td align='center'>
<a href='?action=orders&schedule_num=<?php echo($schedule_num) ?>&naction=edit-header&order_num=<?php echo($order_num) ?>'><?php echo($edit_icon) ?></a>
</td>
<?php } ?>
<?php // if (isset($order_num) && $school_record['display_print_order_button'] != 'N') { ?>
<?php if (isset($order_num)) { ?>
<td align='center'><a href='?action=orders-print&schedule_num=<?php echo($schedule_num) ?>&order_num=<?php echo($order_num) ?>'><?php echo($print_icon) ?></a></td>
<?php } ?>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>