File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
client/src/js/modules/types/mx/shipment/views Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -649,6 +649,11 @@ function argOrNull($key)
649649 return $ this ->has_arg ($ key ) ? $ this ->arg ($ key ) : null ;
650650 }
651651
652+ function argIfNotEmptyString ($ key )
653+ {
654+ return $ this ->has_arg ($ key ) && $ this ->arg ($ key ) !== '' ? $ this ->arg ($ key ) : null ;
655+ }
656+
652657 # ------------------------------------------------------------------------
653658 # Misc Helpers
654659
Original file line number Diff line number Diff line change @@ -2607,8 +2607,8 @@ function _add_container()
26072607 $ tem = $ this ->has_arg ('STORAGETEMPERATURE ' ) ? $ this ->arg ('STORAGETEMPERATURE ' ) : null ;
26082608
26092609 $ crid = $ this ->has_arg ('CONTAINERREGISTRYID ' ) ? $ this ->arg ('CONTAINERREGISTRYID ' ) : null ;
2610- $ pcid = $ this ->has_arg ('PARENTCONTAINERID ' ) ? $ this -> arg ( ' PARENTCONTAINERID ' ) : null ;
2611- $ pcl = $ this ->has_arg ('PARENTCONTAINERLOCATION ' ) ? $ this -> arg ( ' PARENTCONTAINERLOCATION ' ) : null ;
2610+ $ pcid = $ this ->argIfNotEmptyString ('PARENTCONTAINERID ' );
2611+ $ pcl = $ this ->argIfNotEmptyString ('PARENTCONTAINERLOCATION ' );
26122612
26132613 $ pipeline = $ this ->has_arg ('PROCESSINGPIPELINEID ' ) ? $ this ->arg ('PROCESSINGPIPELINEID ' ) : null ;
26142614 $ source = $ this ->has_arg ('SOURCE ' ) ? $ this ->arg ('SOURCE ' ) : null ;
@@ -2640,7 +2640,7 @@ function _add_container()
26402640 if ($ e ->getCode () == 1062 ) {
26412641 $ this ->_error ('Barcode is not unique. Please enter a different barcode. ' , 409 );
26422642 } else {
2643- $ this ->_error ('An unexpected error occurred. ' , 500 );
2643+ $ this ->_error ('An unexpected error occurred: ' . $ e -> getMessage () , 500 );
26442644 }
26452645 }
26462646 }
Original file line number Diff line number Diff line change @@ -751,8 +751,8 @@ export default {
751751 this .NAME = ' '
752752 this .BARCODE = ' '
753753 this .CONTAINERREGISTRYID = ' '
754- this .PARENTCONTAINERID = ' '
755- this .PARENTCONTAINERLOCATION = ' '
754+ this .PARENTCONTAINERID = null
755+ this .PARENTCONTAINERLOCATION = null
756756 // Trigger default setting of UDC fields if selected
757757 this .selectQueueForUDC (this .AUTOMATED )
758758
You can’t perform that action at this time.
0 commit comments