Fix blockedlog module must store ref of invoice once validated

This commit is contained in:
Laurent Destailleur 2018-01-12 19:09:43 +01:00
parent d0680b429f
commit 8014f7d822
2 changed files with 10 additions and 1 deletions

View File

@ -364,6 +364,8 @@ class BlockedLog
))) continue; // Discard if not into a dedicated list
if (!is_object($value)) $this->object_data->{$key} = $value;
}
if (! empty($object->newref)) $this->object_data->ref = $object->newref;
}
elseif ($this->element == 'invoice_supplier')
{
@ -375,6 +377,8 @@ class BlockedLog
))) continue; // Discard if not into a dedicated list
if (!is_object($value)) $this->object_data->{$key} = $value;
}
if (! empty($object->newref)) $this->object_data->ref = $object->newref;
}
elseif ($this->element == 'payment' || $this->element == 'payment_supplier' || $this->element == 'payment_donation')
{
@ -474,10 +478,14 @@ class BlockedLog
}
$this->object_data->amount = $totalamount;
if (! empty($object->newref)) $this->object_data->ref = $object->newref;
}
elseif($this->element == 'payment_salary')
{
$this->object_data->amounts = array($object->amount);
if (! empty($object->newref)) $this->object_data->ref = $object->newref;
}
return 1;

View File

@ -1,5 +1,6 @@
<?php
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by