Skip to content

Commit

Permalink
Merge branch 'main' into MAIN-B-20975-TOO-submits-MTO-and-receives-in…
Browse files Browse the repository at this point in the history
…correct-validation
  • Loading branch information
samaysofo authored Oct 22, 2024
2 parents 6c135c5 + ec214fe commit 5214c3f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions migrations/app/migrations_manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@
20240917165710_update_duty_locations_provides_services_counseling.up.sql
20240927145659_update_mobile_home_factor.up.sql
20240930171315_updatePostalCodeToGbloc233BGNC.up.sql
20241001144741_update_boat_factor.up.sql
20241001174400_add_is_oconus_column.up.sql
20241001193619_market-code-enum.up.sql
20241002151527_add_transportation_offices_AK_HI.up.sql
Expand Down
26 changes: 26 additions & 0 deletions migrations/app/schema/20241001144741_update_boat_factor.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
-- Update shipment factor for boat tow away and haul away shipments
UPDATE re_shipment_type_prices AS rstp SET factor = 35.33 FROM re_services AS rs WHERE rs.id = rstp.service_id AND rs.code = 'DBTF';
UPDATE re_shipment_type_prices AS rstp SET factor = 45.77 FROM re_services AS rs WHERE rs.id = rstp.service_id AND rs.code = 'DBHF';

-- Add service item param so that the frontend can show the mobile home factor in pricing calculations
INSERT INTO service_item_param_keys
(id, key,description,type,origin,created_at,updated_at)
VALUES
('b03af5dc-7701-4e22-a986-d1889a2a8f27', 'DomesticBoatTowAwayFactor', 'Domestic Boat Tow-Away Factor applied to calculation (if applicable)', 'DECIMAL', 'PRICER', now(), now()),
('add5114b-2a23-4e23-92b3-6dd0778dfc33', 'DomesticBoatHaulAwayFactor', 'Domestic Boat Haul-Away Factor applied to calculation (if applicable)', 'DECIMAL', 'PRICER', now(), now());

-- Map to service item
INSERT INTO service_params
(id,service_id,service_item_param_key_id,created_at,updated_at, is_optional)
VALUES
('d2b25479-e2eb-42bc-974f-054942fa7f8f', (SELECT id FROM re_services WHERE code='DLH'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatTowAwayFactor'), now(), now(), TRUE),
('705b3733-838f-4187-bd6a-c959fa746c35', (SELECT id FROM re_services WHERE code='DSH'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatTowAwayFactor'), now(), now(), TRUE),
('3b99ff81-9d32-4835-89ee-13758085fc28', (SELECT id FROM re_services WHERE code='DPK'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatTowAwayFactor'), now(), now(), TRUE),
('572fb69e-3499-43b9-a43b-c0e1578a5711', (SELECT id FROM re_services WHERE code='DUPK'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatTowAwayFactor'), now(), now(), TRUE),
('d6030866-99a8-4d3f-a710-7e7bf3a366b5', (SELECT id FROM re_services WHERE code='DOP'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatTowAwayFactor'), now(), now(), TRUE),
('65112ef3-4193-45aa-a883-0f17e2a5224d', (SELECT id FROM re_services WHERE code='DDP'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatTowAwayFactor'), now(), now(), TRUE),
('d5c0e434-03eb-4839-9c31-4ecc26342728', (SELECT id FROM re_services WHERE code='DLH'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatHaulAwayFactor'), now(), now(), TRUE),
('32c1366b-d3e0-4d95-93fe-ddc4acb665f1', (SELECT id FROM re_services WHERE code='DSH'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatHaulAwayFactor'), now(), now(), TRUE),
('e4ea110b-30cd-468c-a938-1e47f47e6a9c', (SELECT id FROM re_services WHERE code='DPK'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatHaulAwayFactor'), now(), now(), TRUE),
('daf3b4d4-9d1d-4338-94c4-2afc2500d716', (SELECT id FROM re_services WHERE code='DOP'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatHaulAwayFactor'), now(), now(), TRUE),
('f6fd74ef-df9a-4b2d-b16d-028ab10bb8ea', (SELECT id FROM re_services WHERE code='DDP'), (SELECT id FROM service_item_param_keys WHERE key='DomesticBoatHaulAwayFactor'), now(), now(), TRUE);

0 comments on commit 5214c3f

Please sign in to comment.