Skip to content

Commit

Permalink
Merge pull request #34 from dondominio/Version-2.2.20
Browse files Browse the repository at this point in the history
Version 2.2.20
  • Loading branch information
JAndreuSoler authored May 6, 2024
2 parents f872943 + 66d30e9 commit a646c0e
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [2.2.20] - 2024-05-03
### Changed
- Use `Tax ID` as `Vat Number` registrar option.

## [2.2.19] - 2024-03-11
### fixed
- `adminContactType` in dondominiossl
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG-es.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ y este proyecto se adhiere a [Semantic Versioning](https://semver.org/spec/v2.0.

## [Pendiente por lanzar]

## [2.2.20] - 2024-05-03
### Changed
- Opción para utilizar `Tax ID` como `Vat Number` en opciones del registrador.

## [2.2.19] - 2024-03-11
### fixed
- `adminContactType` en dondominiossl
Expand Down
2 changes: 1 addition & 1 deletion README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This project has all the developed integrations between MrDomain and WHMCS.
## Status
| Version |
|:--------|
| 2.2.19 |
| 2.2.20 |

## Requirements
| Name | Version |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Este proyecto contiene todos los módulos desarrollados entre DonDominio y WHMCS
## Estado
| Version |
|:--------|
| 2.2.19 |
| 2.2.20 |

## Requerimientos
| Name | Version |
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dondominio/whmcs",
"description": "DonDominio - WHCMCS Modules Integration",
"version": "2.2.19",
"version": "2.2.20",
"license": "LGPL-3.0-only",
"type": "project",
"minimum-stability": "dev",
Expand Down
14 changes: 14 additions & 0 deletions src/modules/addons/dondominio/lib/Services/WHMCS_Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,20 @@ public function getDomainExtendedById($id)
if (!empty($extDomain->vatnumber)) {
return $extDomain;
}

$useTaxID = Capsule::selectOne('
SELECT * FROM `tblregistrars`
WHERE `tblregistrars`.`registrar` = "dondominio"
AND `tblregistrars`.`setting` = "useTaxID"
')->value;

if (!empty($useTaxID) && function_exists('decrypt')) {
$useTaxIDMode = decrypt($useTaxID);
if ($useTaxIDMode === 'on' && $extDomain->tax_id !== '') {
$extDomain->vatnumber = $extDomain->tax_id;
return $extDomain;
}
}

$registrarFileName = Capsule::selectOne('
SELECT * FROM `tblregistrars`
Expand Down
4 changes: 2 additions & 2 deletions src/modules/addons/dondominio/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.2.19",
"releaseDate": "2024-03-11"
"version": "2.2.20",
"releaseDate": "2024-05-03"
}
4 changes: 4 additions & 0 deletions src/modules/registrars/dondominio/lib/Actions/Action.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ protected function getVATNumber()
// Search by Custom Field

if (empty($vatNumber) && !empty($this->params['vat'])) {
if ($this->params['useTaxID'] && array_key_exists('tax_id', $this->params) && is_string($this->params['tax_id']) && $this->params['tax_id'] !== '' ) {
return $this->params['tax_id'];
}

$vatNumberCustomField = $this->app->getService('whmcs')->getCustomFieldByFieldName($this->params['vat']);

// Try to find custom field through old select version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ public function __invoke()
"Options" => "," . implode(",", $customFields),
"Description" => "Custom field containing the VAT Number for your customers"
],
'useTaxID' => [
'FriendlyName' => 'Use tax ID',
'Type' => 'yesno',
'Description' => 'Use Tax ID as VAT Number'
],
//FOACONTACT
"foacontact" => [
"FriendlyName" => "FOA Contact",
Expand Down
4 changes: 2 additions & 2 deletions src/modules/registrars/dondominio/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.2.19",
"releaseDate": "2024-03-11"
"version": "2.2.20",
"releaseDate": "2024-05-03"
}
4 changes: 2 additions & 2 deletions src/modules/servers/dondominiossl/version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.2.19",
"releaseDate": "2024-03-11"
"version": "2.2.20",
"releaseDate": "2024-05-03"
}

0 comments on commit a646c0e

Please sign in to comment.