Merge pull request #11858 from ptibogxiv/patch-260

FIX new invoice with generic thirdparty in takepos
This commit is contained in:
Laurent Destailleur 2019-09-14 17:10:32 +02:00 committed by GitHub
commit 92c6168247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,8 +280,10 @@ if ($action == "delete") {
$resql1 = $db->query($sql);
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture = ".$placeid;
$resql2 = $db->query($sql);
$sql="UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}." where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'";
$resql3 = $db->query($sql);
if ($resql1 && $resql2)
if ($resql1 && $resql2 && $resql3)
{
$db->commit();
}