Skip to content

Commit

Permalink
Merge pull request #20297 from aspangaro/12p23
Browse files Browse the repository at this point in the history
FIX #20279 Accountancy - PostGreSQL - Error on mass update lines already binded
  • Loading branch information
eldy committed Mar 24, 2022
2 parents d27c0b3 + 87b187b commit 76470c9
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 76470c9

Please sign in to comment.