Skip to content

Commit

Permalink
(#23) andlor return-packaging sync issue CU-39w1rha
Browse files Browse the repository at this point in the history
Co-authored-by: ZJ <zak@newalexandria.org>
  • Loading branch information
mrshahsuvie and NewAlexandria committed Nov 14, 2022
1 parent 21c2eec commit aa7d067
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions lib/solidus_bactracs/api/shipment_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ def initialize(shipment:)
def call(sguid: nil)
order = @shipment.order
user = @shipment.user
rma_type = safe_rma_type
rp_location = get_rp_location
df_part = get_df_part

xml = Builder::XmlMarkup.new
xml.instruct!(:xml, :encoding => "UTF-8")
Expand All @@ -26,7 +23,7 @@ def call(sguid: nil)
xml.sGuid sguid
xml.NewRMA {
xml.RMANumber @shipment.number
xml.RMATypeName rma_type
xml.RMATypeName safe_rma_type
xml.RMASubTypeName
xml.CustomerRef
xml.InboundShippingPriority
Expand Down Expand Up @@ -95,8 +92,8 @@ def line_items_xml(xml: nil, line_item: nil, variant: nil, order: nil)
xml.WarrantyRepair
xml.RMALineTest
xml.InboundShipWeight variant.weight.to_f
xml.RPLocation rp_location
xml.DFPart df_part
xml.RPLocation get_rp_location
xml.DFPart get_df_part
}
end

Expand All @@ -107,9 +104,8 @@ def safe_rma_type

def get_rp_location
#Double verifing
return nil if rma_type == "4"
return nil if safe_rma_type == "4"

rp_location = @shipment.get_rma_rp_location if @shipment.get_rma_rp_location
@config.default_rp_location.call(@shipment)
end

Expand All @@ -119,7 +115,7 @@ def find_sku_variant(variant)

def get_df_part
df_part =
if rma_type == "4"
if safe_rma_type == "4"
@shipment.number
else
nil
Expand Down
2 changes: 1 addition & 1 deletion lib/solidus_bactracs/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module SolidusBactracs
VERSION = '3.5.0'
VERSION = '3.5.1'
end

0 comments on commit aa7d067

Please sign in to comment.