From f7be5c27b83384d10db241fe454ea103ff9c723d Mon Sep 17 00:00:00 2001
From: Philip Reetz
Date: Mon, 14 Nov 2005 11:03:21 +0000
Subject: [PATCH] Fehler beim Speichern von Auftraegen behoben, wenn Angebot in
Auftrag umgewandelt wird
---
SL/OE.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/SL/OE.pm b/SL/OE.pm
index d5d1aa7ba..e0b6ab6b9 100644
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -182,6 +182,7 @@ sub save {
$query = qq|DELETE FROM shipto
WHERE trans_id = $form->{id}|;
$dbh->do($query) || $form->dberror($query);
+ $delete_oe_id = 0;
} else {
@@ -199,6 +200,7 @@ sub save {
WHERE o.ordnumber = '$uid'|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
+ $delete_oe_id = 1;
($form->{id}) = $sth->fetchrow_array;
$sth->finish;
@@ -225,6 +227,9 @@ sub save {
map {
$form->{"${_}_$i"} = $form->parse_amount($myconfig, $form->{"${_}_$i"})
} qw(qty ship);
+ if ($delete_oe_id) {
+ $form->{"orderitems_id_$i"} = "";
+ }
if ($form->{"qty_$i"}) {
--
2.20.1