Buybacks Sales Analysis updated incorrectly for $0 Priced Invoice

Issue No: AR-11190
Created 11/13/2019 11:01:04 AM
Type Bug-QC
Priority Blocker
Status Closed
Resolution Fixed
Fixed Version 19.2
Description Steps:   # Use Customer database CV # Create a $0 invoice for PCC customer Post # In Buybacks, create the reimbursement for the invoice # Go to Sales Analysis and take a look at the data for the $0 invoice   Issue:   # Margin should be $0 less cost = -827.21 # Margin Percentage should be -100% # Margin per Unit should be $0 less $9.40 = -$9.40   !pastedImage_d126768_0.png|height=242,width=907!     Note: Since we are creating a debit memo for the reimbursement, we are creating 2 separate records totaling 1 delivery. The combination of the debit memo (reimbursement) and Sales Invoice ($0 price) should reflect the true margin of the delivery.   Based on records above, if you add the debit memo and invoice, these are the following totals:   Unit Cost = 9.40   Total Cost = $827.21   Margin = 26.40 + 22 + 827.21 - 827.21 = $48.40   Margin Percentage = 100 + 100 + 100 - 100 = 200% (only because there is no cost tied to comm and freight)   Margin Per Unit = .30 + .25 + 9.40 - 9.40 = .55