Skip to content

Commit

Permalink
FIX Data related to customer moved to thirparties api
Browse files Browse the repository at this point in the history
Related to commit : b682570
  • Loading branch information
Neil Orley committed Oct 24, 2017
1 parent 576db84 commit 327f316
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions htdocs/societe/class/api_thirdparties.class.php
Expand Up @@ -83,6 +83,13 @@ function get($id)
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}

$filterabsolutediscount = "fk_facture_source IS NULL OR (fk_facture_source IS NOT NULL AND (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS RECEIVED)%'))";
$filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')";
$absolute_discount = $this->company->getAvailableDiscounts('', $filterabsolutediscount);
$absolute_creditnote = $this->company->getAvailableDiscounts('', $filtercreditnote);
$this->company->absolute_discount = price2num($absolute_discount, 'MT');
$this->company->absolute_creditnote = price2num($absolute_creditnote, 'MT');

return $this->_cleanObjectDatas($this->company);
}

Expand Down

0 comments on commit 327f316

Please sign in to comment.