Internal - Find invoices in Cycle Batch (Internal)

Issue:

 

Invoices were printed by mistake and need to be put back in the print queue. How can we find the invoices that were created in the batch and put them back in the print queue?

 

Resolution:

The script below can be used to find the AR invoices that were created in the cycle batch.

Run the select to verify you have the correct cycle and then use the update to change the In_Print_Queue to a Y.

 

 

--- This is the query that will isolate the invoices to be put in the print queue pending on customer approval. ---

 

select c.Customer_Number, b.Email_Cycle_Invoice, b.Email_Job_Invoice, b.Email_Service_Invoice, b.Email_Job_Invoice, b.print_cycle_invoice, i.*

--Update i Set In_Print_Queue ='Y'

from AR_Invoice i 

join ar_customer c on i.Customer_Id = c.customer_id

join AR_Customer_Bill b on i.Customer_Bill_Id = b.Customer_Bill_Id

join AR_Cycle_Customer cu on cu.Invoice_Number = i.Invoice_Number

where cu.Cycle_Id = 480

and b.Print_Cycle_Invoice <> 'N'

and In_Print_Queue not in ('Y')

and Net_Due > 0

and not exists (select 1 from AR_ACH where Invoice_id = i.Invoice_Id and trans_status = 'Ready')

Was this article helpful?
Thank you for your feedback!
User Icon

Thank you! Your comment has been submitted for approval.