@@ -23,9 +23,9 @@ def columns
2323 variant : variant_name ,
2424
2525 quantity : proc { |line_items | line_items . map ( &:quantity ) . sum ( &:to_i ) } ,
26- item_price : proc { |line_items | line_items . map ( &:amount ) . sum ( & :to_f ) . round ( 2 ) } ,
26+ item_price : proc { |line_items | prices_sum ( line_items . map ( &:amount ) ) } ,
2727 item_fees_price : proc { |line_items |
28- line_items . map ( &:amount_with_adjustments ) . sum ( & :to_f ) . round ( 2 )
28+ prices_sum ( line_items . map ( &:amount_with_adjustments ) )
2929 } ,
3030 admin_handling_fees : proc { |_line_items | "" } ,
3131 ship_price : proc { |_line_items | "" } ,
@@ -68,7 +68,7 @@ def columns
6868 order_number : proc { |line_items | line_items . first . order . number } ,
6969 date : proc { |line_items | line_items . first . order . completed_at . strftime ( "%F %T" ) } ,
7070 final_weight_volume : proc { |line_items |
71- line_items . map ( &:final_weight_volume ) . sum ( &:to_f ) . round ( 2 )
71+ line_items . map ( &:final_weight_volume ) . sum ( &:to_f ) . round ( 3 )
7272 } ,
7373 shipment_state : proc { |line_items | line_items . first . order . shipment_state } ,
7474 }
@@ -129,8 +129,8 @@ def summary_row(order, rows)
129129 {
130130 hub : rows . last . hub ,
131131 customer : rows . last . customer ,
132- item_price : rows . map ( &:item_price ) . sum ( & :to_f ) . round ( 2 ) ,
133- item_fees_price : rows . map ( &:item_fees_price ) . sum ( & :to_f ) . round ( 2 ) ,
132+ item_price : prices_sum ( rows . map ( &:item_price ) ) ,
133+ item_fees_price : prices_sum ( rows . map ( &:item_fees_price ) ) ,
134134 admin_handling_fees : order . admin_and_handling_total ,
135135 ship_price : order . ship_total ,
136136 pay_fee_price : order . payment_fee ,
0 commit comments