Credit memo not applying to an AR Tranasaction
I am developing a AR INvoice interface and I am using Autoinvoice import program to create the transactions. I am able to create a credit memo using the autoinvoice. But the credit memo is not getting applied to invoice.
The insert statement i am using is :
INSERT INTO ra_interface_lines_all (
interface_line_context,
interface_line_attribute1,
batch_source_name,
line_type,
description,
currency_code,
amount,
cust_trx_type_name,
orig_system_bill_customer_id,
orig_system_bill_customer_ref,
orig_system_bill_address_id,
orig_system_bill_address_ref,
conversion_type,
conversion_rate,
reference_line_id,