There are 2 ways to Regenerate the Day End report, depending on which day needs to be re-run. If needed for the previous day, follow Process 1. If for another previous day, follow Process 2.
Process 1
- Open the ERP web app for the required system and log in
- Go to the erp_counter table in DataGrip or HeidiSQL
- Subtract 1 from the day_counter column
- In the ERP web app, click the Day End button and wait until PDF is completely generated
- Day End files have been successfully regenerated
Process 2
- Open the ERP web app for the required system and log in
- Obtain an Invoice # for the day needing to be regenerated
- Note the current day_counter value in the erp_counter table
- Run the following SQL Statement to set the counter to the correct date where :user_input is the invoice number from Step 2
-- Update the day_counter in the erp_counter table
UPDATE erp_counter
SET day_counter = (
-- Select the day_counter value from the erp_invoicing table
SELECT day_counter
FROM erp_invoicing
-- Filter the erp_invoicing table to get the row where id_primary matches the user input
WHERE id_primary = :user_input
)
-- Specify the row in the erp_counter table to update (where id is 1)
WHERE id = 1;
/*
Step 1 - Verify which ERP system the Day End Report needs to be generated for
Step 2 - Verify which workorder range needs to be generated
Step 3 - Find the day_counter number in erp_invoiceing related to the workorders
Step 4 - Decrease day_counter in erp_counter to match the day_counter in erp_invoicing
Step 5 - Open ERP in a browser and click "Day End" button to regenerate report
Step 6 - Verify report was generated in S:\integrations. The file will have a prefix matching the ERP system being generated
Step 7 - If report still fails, contact IT to have the drive unmounted/remounted
For Lafayette, CC Larry Barkley, Michelle Prejean, Michelle Fleury, and Theresa Enns when responding and marking ticket as resolved.
*/Once run, set the day_counter to the value noted in Step 3 to complete the process.