mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-21 01:55:59 +02:00
More preparations for prices per registrar option
This commit is contained in:
parent
75512b7da9
commit
6183744174
3 changed files with 44 additions and 11 deletions
|
@ -3159,13 +3159,24 @@ class DomainsController extends Controller
|
|||
$creditLimit = $result['creditLimit'];
|
||||
|
||||
$renew_price = $db->selectValue(
|
||||
'SELECT m12 FROM domain_price WHERE tldid = ? AND command = ? LIMIT 1',
|
||||
[$tldid, 'renew']
|
||||
"SELECT m12
|
||||
FROM domain_price
|
||||
WHERE tldid = ?
|
||||
AND command = ?
|
||||
AND (registrar_id = ? OR registrar_id IS NULL)
|
||||
ORDER BY registrar_id DESC
|
||||
LIMIT 1",
|
||||
[$tldid, 'renew', $clid]
|
||||
);
|
||||
|
||||
|
||||
$restore_price = $db->selectValue(
|
||||
'SELECT price FROM domain_restore_price WHERE tldid = ? LIMIT 1',
|
||||
[$tldid]
|
||||
"SELECT price
|
||||
FROM domain_restore_price
|
||||
WHERE tldid = ?
|
||||
AND (registrar_id = ? OR registrar_id IS NULL)
|
||||
ORDER BY registrar_id DESC
|
||||
LIMIT 1",
|
||||
[$tldid, $clid]
|
||||
);
|
||||
|
||||
if (($registrar_balance + $creditLimit) < ($renew_price + $restore_price)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue