File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
client/src/js/modules/shipment/views Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -3451,6 +3451,10 @@ function _create_awb()
34513451 && in_array ($ this ->arg ('COUNTRY ' ), $ facility_courier_countries )
34523452 && Utils::getValueOrDefault ($ use_shipping_service_redirect_incoming_shipments )
34533453 ) {
3454+ if ($ ship ['EXTERNALSHIPPINGIDTOSYNCHROTRON ' ]) {
3455+ $ this ->_error ("Shipping service error: Booking already exists " );
3456+ return ;
3457+ }
34543458 try {
34553459 $ this ->_create_shipment_shipment_request ($ ship , $ dewars );
34563460 $ this ->_output (array ('EXTERNAL ' => "1 " ));
Original file line number Diff line number Diff line change @@ -468,6 +468,14 @@ define(['backbone',
468468 return
469469 }
470470
471+ const ss_url = app . options . get ( "shipping_service_app_url_incoming" )
472+ const externalid = this . shipment . get ( 'EXTERNALSHIPPINGIDTOSYNCHROTRON' )
473+ if ( externalid && ss_url ) {
474+ const link = ss_url + '/shipment-requests/' + externalid + '/incoming'
475+ window . location . assign ( link )
476+ return
477+ }
478+
471479 var prod = null
472480 if (
473481 (
@@ -510,7 +518,7 @@ define(['backbone',
510518 } ,
511519 success : function ( resp ) {
512520 if (
513- app . options . get ( "shipping_service_app_url_incoming" )
521+ ss_url
514522 && ( Number ( self . terms . get ( 'ACCEPTED' ) ) === 1 ) // terms.ACCEPTED could be undefined, 1, or "1"
515523 && app . options . get ( "facility_courier_countries" ) . includes ( country )
516524 ) {
@@ -521,9 +529,7 @@ define(['backbone',
521529 app . alert ( { message : "Error performing redirect: external shipping id is null" } )
522530 return ;
523531 }
524- window . location . assign (
525- `${ app . options . get ( "shipping_service_app_url" ) } /shipment-requests/${ external_id } /incoming`
526- )
532+ window . location . assign ( `${ ss_url } /shipment-requests/${ external_id } /incoming` )
527533 } )
528534 } else {
529535 app . message ( { message : 'Air Waybill Successfully Created' } )
You can’t perform that action at this time.
0 commit comments