Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/multicurrency/class/multicurrency.class.php
This commit is contained in:
commit
ec5461a4d1
@ -3036,8 +3036,13 @@ else
|
|||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&action=edit">'.$langs->trans('Modify').'</a></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$discount = new DiscountAbsolute($db);
|
||||||
|
$result = $discount->fetch(0, 0, $object->id);
|
||||||
|
|
||||||
// Reopen a standard paid invoice
|
// Reopen a standard paid invoice
|
||||||
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
|
if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT
|
||||||
|
|| ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && empty($discount->id)))
|
||||||
|
&& ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
|
||||||
{
|
{
|
||||||
if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice
|
if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice
|
||||||
{
|
{
|
||||||
|
|||||||
@ -624,14 +624,14 @@ class MultiCurrency extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sync rates from api
|
* Sync rates from api
|
||||||
*
|
*
|
||||||
* @param array $response array of reponse from api to sync dolibarr rates
|
* @param array $response array of reponse from api to sync dolibarr rates
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function syncRates($response)
|
public static function syncRates($response)
|
||||||
{
|
{
|
||||||
global $db,$conf;
|
global $conf, $db, $langs;
|
||||||
|
|
||||||
$ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
|
$ch = curl_init('http://apilayer.net/api/live?access_key='.$key.'');
|
||||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||||
@ -639,8 +639,8 @@ class MultiCurrency extends CommonObject
|
|||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
$response = json_decode($response);
|
$response = json_decode($response);
|
||||||
|
|
||||||
if ($response->success) {
|
if ($response->success)
|
||||||
|
{
|
||||||
$TRate = $response->quotes;
|
$TRate = $response->quotes;
|
||||||
$timestamp = $response->timestamp;
|
$timestamp = $response->timestamp;
|
||||||
|
|
||||||
|
|||||||
@ -44,6 +44,7 @@ class Entrepot extends CommonObject
|
|||||||
public $table_element='entrepot';
|
public $table_element='entrepot';
|
||||||
|
|
||||||
public $picto='stock';
|
public $picto='stock';
|
||||||
|
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Warehouse closed, inactive
|
* Warehouse closed, inactive
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user