DB3 write "$file"
REDIRECT "/doc/${id}"
;;
- update_invoice)
+ update_invoice|update_invoice_return)
id="$(POST id)" file="$_DATA/${id}.kvd" seq=''
if [ "$(POST tid)" = "$(transid "$file")" ] && LOCK "$file"; then
DB3 open "$file"
else
debug "TID mismatch updating $file"
fi
- REDIRECT "$PATH_INFO"
+ if [ $(POST action) = update_invoice_return ]; then
+ REDIRECT /
+ else
+ REDIRECT "$PATH_INFO"
+ fi
;;
pdf_export)
id="$(POST id)" file="$_DATA/${id}.kvd" tmp="$(randomid)"