Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
crossan007 authored and DawoudIO committed Feb 7, 2018
1 parent ef48d09 commit d65e67f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PledgeEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@
$nonZeroFundAmountEntered = 0;
foreach ($fundId2Name as $fun_id => $fun_name) {
//$fun_active = $fundActive[$fun_id];
$nAmount[$fun_id] = InputUtils::LegacyFilterInput($_POST[$fun_id.'_Amount']);
$sComment[$fun_id] = InputUtils::LegacyFilterInput($_POST[$fun_id.'_Comment']);
$nAmount[$fun_id] = InputUtils::FilterFloat($_POST[$fun_id.'_Amount']);
$sComment[$fun_id] = InputUtils::FilterString($_POST[$fun_id.'_Comment']);
if ($nAmount[$fun_id] > 0) {
++$nonZeroFundAmountEntered;
}

if ($bEnableNonDeductible) {
$nNonDeductible[$fun_id] = InputUtils::LegacyFilterInput($_POST[$fun_id.'_NonDeductible']);
$nNonDeductible[$fun_id] = InputUtils::FilterFloat($_POST[$fun_id.'_NonDeductible']);
//Validate the NonDeductible Amount
if ($nNonDeductible[$fun_id] > $nAmount[$fun_id]) { //Validate the NonDeductible Amount
$sNonDeductibleError[$fun_id] = gettext("NonDeductible amount can't be greater than total amount.");
Expand Down Expand Up @@ -736,7 +736,7 @@
if ($bEnableNonDeductible) {
?>
<td class="TextColumn">
<input type="number" step="any" name="<?= $fun_id ?>_NonDeductible" id="<?= $fun_id ?>_NonDeductible" value="<?= $nNonDeductible[$fun_id]?>" />
<input type="number" step="any" name="<?= $fun_id ?>_NonDeductible" id="<?= $fun_id ?>_NonDeductible" value="<?= ($nNonDeductible[$fun_id] ? $nNonDeductible[$fun_id] : "") ?>" />
<br>
<font color="red"><?= $sNonDeductibleError[$fun_id]?></font>
</td>
Expand Down

0 comments on commit d65e67f

Please sign in to comment.