Fix adhtype amount as default on new subscription

This commit is contained in:
daraelmin 2021-10-20 00:29:46 +02:00 committed by GitHub
parent b1de75758f
commit dc465d6bac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -963,7 +963,7 @@ if ($rowid > 0) {
if ($adht->subscription) {
// Amount
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'.GETPOST('subscription').'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'. price(GETPOST("subscription")>0 ? GETPOST("subscription") : $adht->amount).'"> '.$langs->trans("Currency".$conf->currency) .'</td></tr>';
// Label
print '<tr><td>'.$langs->trans("Label").'</td>';