FIX new invoice with generic thirdparty in takepos
by default, new invoice should always create with default thirdparty and avoid errors : creating new invoice with last customer and forget to change it...
This commit is contained in:
parent
ba33369af6
commit
48419da769
@ -280,8 +280,10 @@ if ($action == "delete") {
|
|||||||
$resql1 = $db->query($sql);
|
$resql1 = $db->query($sql);
|
||||||
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture = ".$placeid;
|
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "facturedet where fk_facture = ".$placeid;
|
||||||
$resql2 = $db->query($sql);
|
$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();
|
$db->commit();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user