summaryrefslogtreecommitdiff
path: root/edit_movement.php
diff options
context:
space:
mode:
Diffstat (limited to 'edit_movement.php')
-rw-r--r--edit_movement.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/edit_movement.php b/edit_movement.php
index 1173143..719bad7 100644
--- a/edit_movement.php
+++ b/edit_movement.php
@@ -23,8 +23,13 @@ if( $gContent->isValid() ) {
$errors = [];
if( !empty( $_REQUEST['save'] ) ) {
+ $isNew = empty( $_REQUEST['movement_id'] );
if( $gContent->store( $_REQUEST ) ) {
- header( 'Location: '.STOCK_PKG_URL.'list_movements.php' );
+ if( $isNew ) {
+ header( 'Location: '.STOCK_PKG_URL.'edit_movement.php?movement_id='.$gContent->mMovementId );
+ } else {
+ header( 'Location: '.STOCK_PKG_URL.'list_movements.php' );
+ }
die;
}
$errors = $gContent->mErrors;