Update invoice.php

This commit is contained in:
Laurent Destailleur 2020-11-30 15:39:35 +01:00 committed by GitHub
parent 9ee37153f7
commit 7870a33fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,7 +415,11 @@ if ($action == "delete") {
// We delete the lines
$resdeletelines = 1;
foreach($invoice->lines as $line){
$resdeletelines *= $invoice->deleteline($line->id);
$tmpres = $invoice->deleteline($line->id);
if ($tmpres < 0) {
$resdeletelines = 0;
break;
}
}
$sql = "UPDATE ".MAIN_DB_PREFIX."facture set fk_soc=".$conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]};