Merge pull request #19242 from aspangaro/14p25
FIX Accountancy - Product admin - Log error when we affect accounting account with product_perentity activated
This commit is contained in:
commit
707dd85f43
@ -198,7 +198,7 @@ if ($action == 'update') {
|
|||||||
$nb_exists = $db->num_rows($resql_exists);
|
$nb_exists = $db->num_rows($resql_exists);
|
||||||
if ($nb_exists <= 0) {
|
if ($nb_exists <= 0) {
|
||||||
// insert
|
// insert
|
||||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, '" . $db->escape($accountancy_field_name) . "')";
|
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_perentity (fk_product, entity, " . $db->escape($accountancy_field_name) . ")";
|
||||||
$sql .= " VALUES (" . ((int) $productid) . ", " . ((int) $conf->entity) . ", '" . $db->escape($accounting->account_number) . "')";
|
$sql .= " VALUES (" . ((int) $productid) . ", " . ((int) $conf->entity) . ", '" . $db->escape($accounting->account_number) . "')";
|
||||||
} else {
|
} else {
|
||||||
$obj_exists = $db->fetch_object($resql_exists);
|
$obj_exists = $db->fetch_object($resql_exists);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user