Fix bugs reported by scrutinizer
This commit is contained in:
parent
1838670e31
commit
49f5ec6b52
@ -153,6 +153,7 @@ class Invoices extends DolibarrApi
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$i=0;
|
||||
$num = $db->num_rows($result);
|
||||
while ($i < min($num, ($limit <= 0 ? $num : $limit)))
|
||||
{
|
||||
@ -177,7 +178,7 @@ class Invoices extends DolibarrApi
|
||||
* Create invoice object
|
||||
*
|
||||
* @param array $request_data Request datas
|
||||
* @return int ID of invoice
|
||||
* @return int ID of invoice
|
||||
*/
|
||||
function post($request_data = NULL)
|
||||
{
|
||||
@ -278,7 +279,7 @@ class Invoices extends DolibarrApi
|
||||
/**
|
||||
* Validate fields before create or update object
|
||||
*
|
||||
* @param array $data Datas to validate
|
||||
* @param array|null $data Datas to validate
|
||||
* @return array
|
||||
*
|
||||
* @throws RestException
|
||||
@ -293,4 +294,5 @@ class Invoices extends DolibarrApi
|
||||
}
|
||||
return $invoice;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
use Luracast\Restler\RestException;
|
||||
use Luracast\Restler\RestException;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
/**
|
||||
* API class for supplier invoices
|
||||
@ -153,6 +153,7 @@ class SupplierInvoices extends DolibarrApi
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$i = 0;
|
||||
$num = $db->num_rows($result);
|
||||
while ($i < min($num, ($limit <= 0 ? $num : $limit)))
|
||||
{
|
||||
|
||||
@ -326,7 +326,6 @@ class FactureFournisseur extends CommonInvoice
|
||||
{
|
||||
$idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det');
|
||||
|
||||
var_dump($this->lines[$i]);exit;
|
||||
$this->updateline(
|
||||
$idligne,
|
||||
$this->lines[$i]->description,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user