Unpost an AR Group/Batch

Is there a way to unpost an AR invoice group?

OR is there a way to print the edit list of a posted group?

TranGLC should have what you need for the details.

But once you post, you’re toast.

2 Likes

Correct as far as once your posted.

However, due to many issues over the years, we had to create a solution to re-print an Edit List and/or Reprint a group of invoices.

Let me dig up the scripts required.

I found the process.

First and foremost you need to create a group with the same GROUPID and Invoice Date as the group you used when you originally posted it. Once you have that group, follow these SQL queries/updates.

For the purpose of this example, my posted GROUPID was named “ARINVGRP” and my InvoiceDate was “07-13-20”.

I hope this helps. Please make sure you put all the flags back as indicated in steps 4,5,6 so nobody tries to post it.

–Query 1. To mark invoices as unposted and not printed

UPDATE Erp.InvcHead

SET Posted = 0, DocumentPrinted = 0

WHERE groupid = ‘ARINVGRP’ and posted = 1 and invoicedate = ‘07-13-20’

–Query 2. Copy necessary information from invoice header and lines to UD table

INSERT INTO Ice.UD36 (Company, Date01, Checkbox01, Key1, Key2, Key3,ShortChar01, Number01, Number02, checkbox02, checkbox03)

select b.company, a.invoicedate, a.posted, a.groupid, b.invoicenum, b.invoiceline, a.groupid, b.invoicenum, b.invoiceline, a.ReadyToCalc, b.TaxConnectCalc

from erp.invchead a inner join erp.invcdtl b on a.company = b.company and a.invoicenum = b.invoicenum

where groupid = ‘ARINVGRP’ and posted = 0 and a.invoicedate = ‘07-13-20’

–Query 3. Mark the InvcDtl.TaxConnectCalc = false to be able to print invoices again

UPDATE b

SET b.TaxConnectCalc = 0

from erp.invchead a inner join erp.invcdtl b on a.company = b.company and a.invoicenum = b.invoicenum

where groupid = ‘ARINVGRP’ and posted = 0 and a.invoicedate = ‘07-13-20’

*** You can now run your Edit List and/or Print Invoices ***

–Query 4. To mark invoices as posted again

UPDATE Erp.InvcHead

SET Posted = 1

WHERE Groupid = ‘ARINVGRP’ and posted = 0 and invoicedate = ‘07-13-20’

–Query 5. Reset the InvcDtl.TaxConnectCalc with the original value stored on the UD36

UPDATE b

SET b.TaxConnectCalc = c.CheckBox03

– SELECT b.company, b.InvoiceNum, b.InvoiceLine, b.TaxConnectCalc, c.Company, c.Number01, c.Number02, c.checkbox03

FROM Erp.InvcDtl b INNER JOIN Ice.UD36 c on b.company = c.Company AND b.InvoiceNum = c.Number01 AND b.InvoiceLine = c.Number02

WHERE c.Company = ‘MAXON’ and c.Key1 = ‘ARINVGRP’

–Query 6. Delete Ice.UD36 records

DELETE Ice.UD36

WHERE Company = ‘MAXON’ and Key1 = ‘ARINVGRP’

Just for the new kids in town, directly updating your Epicor database is not supported by Epicor and is in violation of their support agreement. If you damage your database, Epicor won’t leave you high and dry but you will most likely be charged Time and Materials by Professional Services to fix the issue if they can.

1 Like

Very true statement!!!

1 Like