FIX: For external api, don't use lengt_accountg without module accountancy activated
This commit is contained in:
parent
df91a95b9b
commit
a8aeba3ade
@ -8,12 +8,12 @@
|
||||
* Copyright (C) 2010-2015 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013-2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2012-2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2011-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2011-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Cédric Gross <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
*
|
||||
* 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
|
||||
@ -1482,8 +1482,12 @@ else
|
||||
print '</td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
print length_accountg($object->accountancy_code_sell);
|
||||
print '</td></tr>';
|
||||
if (! empty($conf->accounting->enabled)) {
|
||||
print length_accountg($object->accountancy_code_sell);
|
||||
} else {
|
||||
print $object->accountancy_code_sell;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Accountancy buy code
|
||||
print '<tr><td class="nowrap">';
|
||||
@ -1492,7 +1496,11 @@ else
|
||||
print '</td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="2">';
|
||||
print length_accountg($object->accountancy_code_buy);
|
||||
if (! empty($conf->accounting->enabled)) {
|
||||
print length_accountg($object->accountancy_code_buy);
|
||||
} else {
|
||||
print $object->accountancy_code_buy;
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
// Status (to sell)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user