mirror of https://github.com/itflow-org/itflow
Update Payments to only show account_type_parent 1 which is assets
This commit is contained in:
parent
4080774602
commit
7a834b0f5f
|
|
@ -98,16 +98,14 @@ require_once("inc_all_settings.php"); ?>
|
|||
<option value="0">- None -</option>
|
||||
<?php
|
||||
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
||||
$sql = mysqli_query($mysqli, "SELECT * FROM accounts LEFT JOIN account_types ON account_types.account_type_id = accounts.account_type WHERE account_type_parent = 1 AND account_archived_at IS NULL ORDER BY account_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql)) {
|
||||
$account_type = nullable_htmlentities($row['account_type']);
|
||||
if ($account_type < 19 && $account_type > 10) {
|
||||
$account_id = intval($row['account_id']);
|
||||
$account_name = nullable_htmlentities($row['account_name']); ?>
|
||||
<option <?php if ($config_default_payment_account == $account_id) {
|
||||
echo "selected";
|
||||
} ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
||||
<?php }
|
||||
$account_id = intval($row['account_id']);
|
||||
$account_name = nullable_htmlentities($row['account_name']); ?>
|
||||
<option <?php if ($config_default_payment_account == $account_id) {
|
||||
echo "selected";
|
||||
} ?> value="<?php echo $account_id; ?>"><?php echo $account_name; ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -49,16 +49,14 @@ require_once("inc_all_settings.php");
|
|||
<select class="form-control select2" name="config_stripe_account" required>
|
||||
<option value="">- Account -</option>
|
||||
<?php
|
||||
$sql_accounts = mysqli_query($mysqli, "SELECT * FROM accounts WHERE account_archived_at IS NULL ORDER BY account_name ASC");
|
||||
$sql_accounts = mysqli_query($mysqli, "SELECT * FROM accounts LEFT JOIN account_types ON account_types.account_type_id = accounts.account_type WHERE account_type_parent = 1 AND account_archived_at IS NULL ORDER BY account_name ASC");
|
||||
while ($row = mysqli_fetch_array($sql_accounts)) {
|
||||
$account_type = nullable_htmlentities($row['account_type']);
|
||||
if ($account_type < 19 && $account_type > 10) {
|
||||
$account_id = intval($row['account_id']);
|
||||
$account_name = nullable_htmlentities($row['account_name']);
|
||||
$account_id = intval($row['account_id']);
|
||||
$account_name = nullable_htmlentities($row['account_name']);
|
||||
?>
|
||||
|
||||
<option value="<?php echo $account_id ?>" <?php if ($account_id == $config_stripe_account) { echo "selected"; } ?>><?php echo $account_name ?></option>
|
||||
<?php }
|
||||
<option value="<?php echo $account_id ?>" <?php if ($account_id == $config_stripe_account) { echo "selected"; } ?>><?php echo $account_name ?></option>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue