190 lines
9.8 KiB
Plaintext
190 lines
9.8 KiB
Plaintext
|
|
<div id='receipt-dialog' title="<?php displayLanguageText('TEXT-TRANSACTION-RECEIPT'); ?>">
|
|
<div id='dialog-buttons' class='noPrint'>
|
|
<a href='#' id='print-receipt-btn'><span class='smallButton'><?php displayLanguageText('TEXT-PRINT'); ?></span></a>
|
|
<a href='#' id='close-receipt-btn'><span class='smallButton'><?php displayLanguageText('TEXT-CLOSE'); ?></span></a>
|
|
</div>
|
|
<div id='receipt-content'></div>
|
|
</div>
|
|
|
|
<div id='content-dialog' title="<?php displayLanguageText('TEXT-EDIT-CONTENT'); ?>">
|
|
<p class='ltext'><label for='content'><b><?php displayLanguageText('TEXT-CONTENT'); ?>:</b></label><br />
|
|
<textarea cols='150' rows='8' id='content_field' name='content_field'><? echo($content) ?></textarea></p>
|
|
<div class='noPrint'>
|
|
<a href='#' id='save-content-btn'><span class='smallButton'><?php displayLanguageText('TEXT-SAVE'); ?></span></a>
|
|
<a href='#' id='close-content-btn'><span class='smallButton'><?php displayLanguageText('TEXT-CLOSE'); ?></span></a>
|
|
</div>
|
|
</div>
|
|
|
|
<div id='unallocated-dialog' title="<?php displayLanguageText('TEXT-APPLY-ACCOUNT-CREDIT'); ?>">
|
|
<p class='ltext'><b><?php displayLanguageText('TEXT-CREDIT-ON-ACCOUNT'); ?>: <?php echo($currencySymbol . number_format($unallocated_amount,2)) ?></b></p>
|
|
<p class='ltext'><label for='content'><b><?php displayLanguageText('TEXT-TRANSACTION'); ?>:</b></label><br />
|
|
<select name='selected_trx' id='selected_trx' class='select-width400'>
|
|
<?php
|
|
for ($i = 0; $i < count($openTRX); $i++) {
|
|
$trxNum = $openTRX[$i]['record_num'];
|
|
$trxType = $openTRX[$i]['transaction_type'];
|
|
$trxNote = $openTRX[$i]['note'];
|
|
$trxTitle = "";
|
|
if (strlen($trxNote)) $trxTitle .= " - $trxNote";
|
|
|
|
$trxAmt = $openTRX[$i]['transaction_amount'];
|
|
$paidAmt = $openTRX[$i]['amount_paid'];
|
|
$amtOwing = $trxAmt - $paidAmt;
|
|
$totalOwing += $amtOwing;
|
|
|
|
$oNum = intval($openTRX[$i]['order_num']);
|
|
$sNum = intval($openTRX[$i]['schedule_num']);
|
|
if ($oNum > 0) {
|
|
$oSchedule = db_getVal("SELECT schedule_name FROM hotlunch_schedules WHERE school_num = $school_num AND record_num = $sNum");
|
|
$trxTitle .= " ($oSchedule)";
|
|
}
|
|
$selected = " selected='selected'";
|
|
echo("<option value='$trxNum' amt='$amtOwing' $selected>$trxType: $currencySymbol" . number_format($trxAmt,2) . "$trxTitle</option>\n");
|
|
}
|
|
?>
|
|
</select></p>
|
|
<input type='hidden' name='unallocated_trx' id='unallocated_trx'>
|
|
<input type='hidden' name='unallocated_amt' id='unallocated_trx'>
|
|
<input type='hidden' name='user_num' id='user_num'>
|
|
<div id='dialog-buttons' class='noPrint'>
|
|
<a href='#' id='apply-unallocated-btn'><span class='smallButton'><?php displayLanguageText('TEXT-APPLY-ACCOUNT-CREDIT'); ?></span></a>
|
|
<br />
|
|
<br />
|
|
<br />
|
|
<br />
|
|
</div>
|
|
</div>
|
|
|
|
<div id='payment-edit-dialog' title="<?php displayLanguageText('TEXT-EDIT-PAYMENT-INFO'); ?>">
|
|
<form name='payment-edit-form' id='payment-edit-form' method='post'>
|
|
<p class='ltext'><label for='pu_payment_method'><b><?php displayLanguageText('TEXT-PAYMENT-METHOD') ?></b></label><br />
|
|
<select name='pu_payment_method' id='pu_payment_method' class='select-width200'>
|
|
<?php BuildFileList("payment_method.txt") ?>
|
|
</select></p>
|
|
<p class='ltext'><label for='pu_note'><b><?php displayLanguageText('TEXT-NOTE') ?></b></label><br />
|
|
<input type='text' name='pu_note' id='pu_note' size='30'>
|
|
<p class='ltext'><label for='pu_payment_reference'><b><?php displayLanguageText('TEXT-REFERENCE') ?></b></label><br />
|
|
<input type='text' name='pu_payment_reference' id='pu_payment_reference' size='15'></p>
|
|
<p><a href='#' id='save-payment-info-btn'><span class='smallButton'><?php displayLanguageText('TEXT-SAVE'); ?></span></a></p>
|
|
<br />
|
|
<input type='hidden' name='pu_record_num' id='pu_record_num'>
|
|
</form>
|
|
</div>
|
|
|
|
<?php
|
|
if (isset($schedule_num) || (isset($_GET['schedule_num']) && $_GET['schedule_num'] > 0)) {
|
|
$schedule_num = $_GET['schedule_num'];
|
|
$query = "SELECT * FROM hotlunch_schedules_sibling_discounts " .
|
|
"WHERE school_num = $school_num " .
|
|
"AND (schedule_num1 = $schedule_num " .
|
|
"OR schedule_num2 = $schedule_num " .
|
|
"OR schedule_num3 = $schedule_num " .
|
|
"OR schedule_num4 = $schedule_num)";
|
|
$results = db_query($query);
|
|
if (mysql_num_rows($results)) {
|
|
$row = mysql_fetch_array($results,MYSQL_ASSOC);
|
|
extract($row);
|
|
$sd_record_num = $record_num;
|
|
}
|
|
else {
|
|
$schedule_num1 = $schedule_num;
|
|
$schedule_num2 = 0;
|
|
$schedule_num3 = 0;
|
|
$schedule_num4 = 0;
|
|
$child2_percentage = 0;
|
|
$child3_percentage = 0;
|
|
$child4_percentage = 0;
|
|
$child5_percentage = 0;
|
|
$sd_record_num = 0;
|
|
}
|
|
?>
|
|
<div id='sibling-discounts-dialog' title="<?php displayLanguageText('TEXT-SIBLING-DISCOUNTS'); ?>">
|
|
<form name='sibling-discount-form' id='sibling-discount-form' method='post'>
|
|
<p class='ltext'><label for='schedule_num1'><b><?php displayLanguageText('TEXT-SCHEDULE') ?> 1</b></label><br />
|
|
<select name='schedule_num1' id='schedule_num1' class='select-width400'>
|
|
<option value='0'></option>
|
|
<?php
|
|
$cutoff_date = date("Y-m-d",time() - 60 * 60 * 24 * 10);
|
|
$results = db_query("SELECT * FROM hotlunch_schedules WHERE school_num = $school_num AND end_order_date >= '$cutoff_date' ORDER BY start_order_date DESC");
|
|
while ($row = mysql_fetch_array($results,MYSQL_ASSOC)) {
|
|
$selected = "";
|
|
if ($row['record_num'] == $schedule_num1) $selected = " selected='selected'";
|
|
echo(" <option value='" . $row['record_num'] . "'$selected>" . $row['schedule_name'] . "</option>\n");
|
|
}
|
|
?>
|
|
</select></p>
|
|
<p class='ltext'><label for='schedule_num2'><b><?php displayLanguageText('TEXT-SCHEDULE') ?> 2</b></label><br />
|
|
<select name='schedule_num2' id='schedule_num2' class='select-width400'>
|
|
<option value='0'></option>
|
|
<?php
|
|
$cutoff_date = date("Y-m-d",time() - 60 * 60 * 24 * 10);
|
|
$results = db_query("SELECT * FROM hotlunch_schedules WHERE school_num = $school_num AND end_order_date >= '$cutoff_date' ORDER BY start_order_date DESC");
|
|
while ($row = mysql_fetch_array($results,MYSQL_ASSOC)) {
|
|
$selected = "";
|
|
if ($row['record_num'] == $schedule_num2) $selected = " selected='selected'";
|
|
echo(" <option value='" . $row['record_num'] . "'$selected>" . $row['schedule_name'] . "</option>\n");
|
|
}
|
|
?>
|
|
</select></p>
|
|
<p class='ltext'><label for='schedule_num3'><b><?php displayLanguageText('TEXT-SCHEDULE') ?> 3</b></label><br />
|
|
<select name='schedule_num3' id='schedule_num3' class='select-width400'>
|
|
<option value='0'></option>
|
|
<?php
|
|
$cutoff_date = date("Y-m-d",time() - 60 * 60 * 24 * 10);
|
|
$results = db_query("SELECT * FROM hotlunch_schedules WHERE school_num = $school_num AND end_order_date >= '$cutoff_date' ORDER BY start_order_date DESC");
|
|
while ($row = mysql_fetch_array($results,MYSQL_ASSOC)) {
|
|
$selected = "";
|
|
if ($row['record_num'] == $schedule_num3) $selected = " selected='selected'";
|
|
echo(" <option value='" . $row['record_num'] . "'$selected>" . $row['schedule_name'] . "</option>\n");
|
|
}
|
|
?>
|
|
</select></p>
|
|
<p class='ltext'><label for='schedule_num4'><b><?php displayLanguageText('TEXT-SCHEDULE') ?> 4</b></label><br />
|
|
<select name='schedule_num4' id='schedule_num4' class='select-width400'>
|
|
<option value='0'></option>
|
|
<?php
|
|
$cutoff_date = date("Y-m-d",time() - 60 * 60 * 24 * 10);
|
|
$results = db_query("SELECT * FROM hotlunch_schedules WHERE school_num = $school_num AND end_order_date >= '$cutoff_date' ORDER BY start_order_date DESC");
|
|
while ($row = mysql_fetch_array($results,MYSQL_ASSOC)) {
|
|
$selected = "";
|
|
if ($row['record_num'] == $schedule_num4) $selected = " selected='selected'";
|
|
echo(" <option value='" . $row['record_num'] . "'$selected>" . $row['schedule_name'] . "</option>\n");
|
|
}
|
|
?>
|
|
</select></p>
|
|
<table cellspacing='4' cellpadding='1' border='0'>
|
|
<tr>
|
|
<td align='right'><label for='child2_percentage'><b><?php displayLanguageText('TEXT-SECOND-CHILD-DISCOUNT') ?>:</b></label></td>
|
|
<td align='left'><input type='text' name='child2_percentage' id='child2_percentage' size='4' value='<?php echo($child2_percentage) ?>' style='text-align: right'>%</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><label for='child3_percentage'><b><?php displayLanguageText('TEXT-THIRD-CHILD-DISCOUNT') ?>:</b></label></td>
|
|
<td align='left'><input type='text' name='child3_percentage' id='child3_percentage' size='4' value='<?php echo($child3_percentage) ?>' style='text-align: right'>%</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><label for='child4_percentage'><b><?php displayLanguageText('TEXT-FOURTH-CHILD-DISCOUNT') ?>:</b></label></td>
|
|
<td align='left'><input type='text' name='child4_percentage' id='child4_percentage' size='4' value='<?php echo($child4_percentage) ?>' style='text-align: right'>%</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><label for='child5_percentage'><b><?php displayLanguageText('TEXT-FIFTH-CHILD-DISCOUNT') ?>:</b></label></td>
|
|
<td align='left'><input type='text' name='child5_percentage' id='child5_percentage' size='4' value='<?php echo($child5_percentage) ?>' style='text-align: right'>%</td>
|
|
</tr>
|
|
<tr>
|
|
<td align='right'><label for='expiry_date'><b><?php displayLanguageText('TEXT-EXPIRY-DATE') ?>:</b></label></td>
|
|
<td align='left'><input type='text' name='expiry_date' id='expiry_date' class='date-field' size='12' value='<?php echo($expiry_date) ?>'></td>
|
|
</tr>
|
|
</table>
|
|
<input type='hidden' name='sd_record_num' id='sd_record_num' value='<?php echo($sd_record_num) ?>'>
|
|
<p><a href='#' id='save-sibling-discount-btn'><span class='smallButton'><?php displayLanguageText('TEXT-SAVE'); ?></span></a>
|
|
<?php if ($sd_record_num > 0) { ?>
|
|
<a href='#' id='delete-sibling-discount-btn'><span class='smallButton'><?php displayLanguageText('TEXT-DELETE'); ?></span></a>
|
|
<?php } ?>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|
|
|