Пример #1
0
            ?>
' class='date-pick changeInput subscriptionEndDate costHistorySubEnd' />
								</td>
								<?php 
        }
        ?>
								<td>
									<select class='changeDefaultWhite changeInput fundID costHistoryFund' id='searchFundID'>
										<option value=''></option>
										<?php 
        $FundType = new Fund();
        $Funds = array();
        if (array_key_exists('fundID', $payment) && isset($payment['fundID'])) {
            $Funds = $FundType->getUnArchivedFundsForCostHistory($payment['fundID']);
        } else {
            $Funds = $FundType->getUnArchivedFunds();
        }
        foreach ($Funds as $fund) {
            $fundCodeLength = strlen($fund['fundCode']) + 3;
            $combinedLength = strlen($fund['shortName']) + $fundCodeLength;
            $fundName = $combinedLength <= 50 ? $fund['shortName'] : substr($fund['shortName'], 0, 49 - $fundCodeLength) . "&hellip;";
            $fundName .= " [" . $fund['fundCode'] . "]</option>";
            echo "<option";
            if ($payment['fundID'] == $fund['fundID']) {
                echo " selected";
            }
            echo " value='" . $fund['fundID'] . "'>" . $fundName . "</option>";
        }
        ?>
									</select>
								</td>