Fix Client Net terms displaying default Net terms instead of On Receipt if selected

This commit is contained in:
johnnyq 2025-08-11 21:51:05 -04:00
parent f82f3e9b8c
commit 337ceb7477
2 changed files with 7 additions and 4 deletions

View File

@ -49,9 +49,6 @@ if (isset($_GET['client_id'])) {
$client_referral = nullable_htmlentities($row['client_referral']);
$client_currency_code = nullable_htmlentities($row['client_currency_code']);
$client_net_terms = intval($row['client_net_terms']);
if ($client_net_terms == 0) {
$client_net_terms = $config_default_net_terms;
}
$client_tax_id_number = nullable_htmlentities($row['client_tax_id_number']);
$client_abbreviation = nullable_htmlentities($row['client_abbreviation']);
$client_rate = floatval($row['client_rate']);

View File

@ -148,7 +148,13 @@
<span class="text-dark float-right"> <?php echo numfmt_format_currency($currency_format, $recurring_monthly, $client_currency_code); ?></span>
</div>
<div class="ml-1 mt-1 text-secondary">Net Terms
<span class="text-dark float-right"><?php echo $client_net_terms; ?><small class="text-secondary ml-1">Days</small></span>
<span class="text-dark float-right">
<?php if ($client_net_terms) { ?>
<?= $client_net_terms; ?><small class="text-secondary ml-1">Days</small>
<?php } else { ?>
On Receipt
<?php } ?>
</span>
</div>
<?php if(!empty($client_tax_id_number)) { ?>
<div class="ml-1 mt-1 text-secondary">Tax ID