From 102424dc4dcd62bdf1bc4a37ace3f657c6c0fd3c Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 23 Jul 2023 03:00:13 +0000 Subject: [PATCH] continue impl --- Controller/ApiBillController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Controller/ApiBillController.php b/Controller/ApiBillController.php index cee97d5..a1a206d 100755 --- a/Controller/ApiBillController.php +++ b/Controller/ApiBillController.php @@ -562,6 +562,12 @@ final class ApiBillController extends Controller $element = $this->createBillElementFromRequest($request, $response, $old, $data); $this->createModel($request->header->account, $element, BillElementMapper::class, 'bill_element', $request->getOrigin()); + // @todo: handle stock transaction here + // @todo: if transaction fails don't update below and send warning to user + // @todo: however mark transaction as reserved and only update when bill is finalized!!! + + // @todo: in BillElementUpdate do the same + $new = clone $old; $new->addElement($element);