We are needing to add CTT02 segment to a customer's 810.
For the Origin column, we have used EDI Out, with a variety of Field Names. Also tried Database origin with various table/field names.

Invariably, the Quantity is matching the number of lines (18) instead of the total qty (19)
Below is a sample of the output file where line 7 has 2 units and the rest have one. Below the sample data are the fields that I have tried thus far.
Any help would be greatly appreciated.
BIG*20211230*PSI00051069**P0LIO12V~
CUR*SE*USD~
IT1*00001*1*EA*14.00**UP*730838894563~
IT1*00003*1*EA*8.00**UP*730838880245~
IT1*00004*1*EA*14.00**UP*730838880672~
IT1*00005*1*EA*19.00**UP*730838893856~
IT1*00006*1*EA*8.00**UP*730838880115~
IT1*00007*2*EA*14.00**UP*730838890114~
IT1*00008*1*EA*14.00**UP*730838889736~
IT1*00009*1*EA*19.00**UP*730838841949~
IT1*00010*1*EA*8.00**UP*730838879782~
IT1*00011*1*EA*14.00**UP*730838890336~
IT1*00012*1*EA*14.00**UP*730838880719~
IT1*00013*1*EA*19.00**UP*730838893863~
IT1*00014*1*EA*14.00**UP*730838889873~
IT1*00015*1*EA*14.00**UP*730838890312~
IT1*00016*1*EA*8.00**UP*730838880269~
IT1*00017*1*EA*14.00**UP*730838890305~
IT1*00019*1*EA*14.00**UP*730838890121~
IT1*00020*1*EA*14.00**UP*730838890107~
TDS*25700~
CTT*18*18~
Origin - EDI OUT
Qty. Ordered
Total Base Units
Total Dropship Amt.
Total EDI Quantity
Total Fields Generic 1
Total Fields Generic 2
Total Fields Generic 3
Total Packages
Total Units
Generic Counter
Origin - Database
SALES INVOICE LINE
Quantity
Quantity_(Base)
LAX_EDI_Original_Qty.
LAX_Qty._Packed_(Base)
LAX_Package_Qty._to_Ship
SALES SHIPMENT LINE
Quantity
Quantity Invoiced
Quantity_(Base)
Qty._Invoiced_(Base)
LAX_Package_Quantity
SALES INVOICE HEADER
PFitem_Quantity
SALES LINE
Qty_to_Invoice