Skip to content

Commit

Permalink
FIX Dolibarr#20279 Accountancy - PostGreSQL - Error on mass update li…
Browse files Browse the repository at this point in the history
…nes already binded
  • Loading branch information
aspangaro committed Mar 8, 2022
1 parent df0b20a commit 87b187b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions htdocs/accountancy/customer/lines.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@
{
$db->begin();

$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet as l";
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facturedet";
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';

dol_syslog('accountancy/customer/lines.php::changeaccount sql= '.$sql1);
$resql1 = $db->query($sql1);
Expand Down
6 changes: 3 additions & 3 deletions htdocs/accountancy/supplier/lines.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
{
$db->begin();

$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det as l";
$sql1 .= " SET l.fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE l.rowid IN ('.implode(',', $changeaccount).')';
$sql1 = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det";
$sql1 .= " SET fk_code_ventilation=".(GETPOST('account_parent', 'int') > 0 ? GETPOST('account_parent', 'int') : '0');
$sql1 .= ' WHERE rowid IN ('.implode(',', $changeaccount).')';

dol_syslog('accountancy/supplier/lines.php::changeaccount sql= '.$sql1);
$resql1 = $db->query($sql1);
Expand Down

0 comments on commit 87b187b

Please sign in to comment.