mirror of https://github.com/itflow-org/itflow
Switched to DB controlled Account Types
This commit is contained in:
parent
2ee87f0f66
commit
f190e100e8
|
|
@ -28,15 +28,17 @@
|
|||
<span class="input-group-text"><i class="fa fa-fw fa-list"></i></span>
|
||||
</div>
|
||||
<select class="form-control select" name="type" required>
|
||||
<option value="">- Select -</option>
|
||||
<option value="11" <?php if ($account_type == 'Current Assets') echo 'selected'; ?>>Current Assets</option>
|
||||
<option value="12" <?php if ($account_type == 'Fixed Assets') echo 'selected'; ?>>Fixed Assets</option>
|
||||
<option value="13" <?php if ($account_type == 'Other Assets') echo 'selected'; ?>>Other Assets</option>
|
||||
<option value="21" <?php if ($account_type == 'Current Liabilities') echo 'selected'; ?>>Current Liabilities</option>
|
||||
<option value="22" <?php if ($account_type == 'Long Term Liabilities') echo 'selected'; ?>>Long Term Liabilities</option>
|
||||
<option value="23" <?php if ($account_type == 'Other Liabilities') echo 'selected'; ?>>Other Liabilities</option>
|
||||
<option value="30" <?php if ($account_type == 'Equity') echo 'selected'; ?>>Equity</option>
|
||||
</select>
|
||||
<option value="">- Select -</option>
|
||||
<!-- If $account_type is set and exists in the array, show it as selected -->
|
||||
<?php if (isset($account_type) && isset($account_types[$account_type])): ?>
|
||||
<option value="<?php echo $account_type; ?>" selected><?php echo $account_types[$account_type]; ?></option>
|
||||
<?php endif; ?>
|
||||
<option value="">----------------</option>
|
||||
<!-- Loop through the associative array to generate the options -->
|
||||
<?php foreach ($account_types as $value => $label): ?>
|
||||
<option value="<?php echo $value; ?>"><?php echo $label; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue