MAIN - B-22146 - Defect - Incorrect mileage destination SIT #14514
+368
−96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
B-22146
INT PR: #14515
Summary
This is to fix couple of issues that were occurring with following conditions:
One issue was that when TIO is reviewing the payment request,
Mileage
shown were incorrect forDLH, DSH, FSC
other Destination SIT related items while the destination ZIP was correct. It should be the destination address at the time of Destination SIT approval and not the new updated address.Second issue was that when an address update was made 2 or more times, the destination ZIP would lag 1 update behind and display the incorrect ZIP for Domestic linehaul and other related service items.
After some extensive digging in the code for Destination SIT service items, I've refactored existing condition checks in
service_param_value_lookups/distance_zip_lookup.go
and the function inservice_param_value_lookups/service_param_value_lookups.go
. The issue was partly due to using addresses inDeliveryAddressUpdate
model and notSITDestinationOriginalAddress
field stored in the SIT service item.Also, not sure if
mtoShipment.Distance
is used anywhere for HHG, but since the code was in the file from long long time ago, I've updated it to handle the case when there is a destination SIT so it save the distance frompickup zip
todestination zip
.How to test
Now we need to go through the flow of creating a Destination SIT service item -> update destination address -> then payment request.
98204
for pickup address zip and92136
as destination address zip(clickYes
when asked if you know deliver address yet) when creating a HHG shipment.Shipment dates
section. Addestimated weight
andactual weight
-> then choose anyDestination type
at the bottom off the page. -> Save.Add Service Item
-> ChooseDestination SIT
and fill in dates and time.Update Shipment Delivery Address
put91913
in theLocation Lookup
and select that zip. -> add remarks and Save and Save.Edit shipment
-> ClickSee delivery address to proceed
link at the top -> ClickReview request
in the warning message -> ClickYes
and add in remarks and Save.Domestic linehaul, Fuel surcharge, Domestic destination 1st day SIT, Domestic destination SIT delivery, and Domestic destination SIT fuel surcharge
then submit request.Review service items
in Payment requests tab -> Clickshow calculations
to verify the zip and mileage for each service items. The correct destination zip for Domestic linehaul and fuel surcharge should be92136
and the mileage should be1321
. ForDomestic destination SIT fuel surcharge
, zip should be92136
to91913
.Screenshots