280855

From CTMS

Aptean Logo.png







DHL MTS

Invoice Generation CR020


FUNCTIONAL SPECIFICATION - 10.6

- 0.1


Reference: 280855 AS-882D8G













































Client Requirement

  1. At the end of the week, on demand from a button, generate all the invoices
  1. Approve all invoices at once or by exception

Then print all invoices and backing sheets at once or by exception. The print should create a PDF file to a folder on the users PC for each invoice and its backing sheet so perhaps 100 separate files on each run named using the supplier code and invoice number.

Solution

1 ) Generate All Invoices

Create a new button on the invoice screen called GENERATE WEEKLY INVOICES.

Currently when selecting the GENERATE button, the user is taken to a pop up screen where they are prompted to select a debit and credit account. Selecting the Generate Weekly invoices will run the generate invoice code for every customer account where the Generation method = ‘G’.

If the generation fails at any point the appropriate error message will be displayed on screen and once acknowledged the generation process continues.

2) Approve All Invoices

Within the Invoice screen, add a new menu item to the set status menu called Approve ALL.

A query will be run which selects all DRAFT invoices where the invoice date is within the last two months.

Each invoice id will then be passed to the existing code where they will be approved individually.

Currently when the status setting fails, the error is displayed to screen. To allow all invoices to be approved, any errors will be displayed on screen and once the error is acknowledged, the process will continue until all orders have been processed.

3) Print All Invoices

A new menu item will be added to the PRINT MENU called PRINT ALL. When selected the invoice report will run for each invoice generated but not yet printed. Currently, when a user selects to print an invoice, they are directed to the REPORTS screen where they select print and the invoice is displayed in a new browser window.

When selecting the PRINT ALL functionality, the REPORTS screen will not be displayed. A cursor will be created to identify the invoices to be printed. Report parameters will be set as required and rather than WEB.SHOW_DOCUMENT which displays the report in a new browser window, RUN_REPORT_OBJECT will be called to generate each PDF file.

The files will be generated with the customer name and the current date and time. The system parameters

REP_WEB_SERVER_NAME, REP_WEB_SERVER_URL, REP_PDF_DEST_FILEPATH will be used to determine where the pdf files are stored.

Once the generation of the pdf files is completed, the Host command procedure of the UTL package will be used to zip the pdf files .

The procedure AS_TO_CLIENT within the WEBUTIL_FILE_TRANSFER package of the WEBUTIL library will be called to transfer the zipped file from the application server to the users PC.

Before each run, any exisiting PDF and ZIP files will be removed.

Scope

This change will be applied to system version 10.6.0 on DUNTST and once approved DUNPRD.

Set-up

Pre-requisites

None

Menu Structure

‘Unchanged’

Data

Functional Description

3.1 Generate All Invoices

280855 1.png

Currently, when the user selects GENERATE, they are then prompted for the Debit and Credit accounts to generate the Invoices for. Once they have entered the Debit and Credit account, the system finds all Actualised payments for the Credit and Debit accounts where the revenue date is less than today, which have not yet been allocated to an invoice and generates a new invoice.

An additional button will be added called Generate Weekly Invoices. When this is selected, the user will not be prompted for a Debit and Credit account. The system will look for all actualised payments on the system within the revenue date, which have not been allocated to an invoice and the credit account has a GENERATION_METHOD of G. This will provide a list of Credit Accounts and the Generate Invoice code will automatically run for each Credit account in the list until all the Invoices have been generated.

Once the Generate Weekly Invoices has completed, the screen will be updated to display all of the Draft Invoices which have been generated.

3.2 Approve All Invoices

280855 2.png

Currently in the system, the user highlights an invoice line and right clicks to Set the Status. A new menu item will be added to the Set Status menu called APPROVE ALL. When this menu item is selected, the system will find all Draft invoices in the system within the last 2 months and attempt to set the status to Approved. If the approval of an invoice fails, the system will continue with the next invoice.

3.3 Print All Invoices

280855 3.png

Currently, a user selects an invoice and right clicks Print and Invoice. This will display the Reports screen, where the user selects print to display the invoice on screen. A new item will be added to the PRINT menu called PRINT ALL.

Code will run to select all invoices which have been generated but not yet printed. Rather than display the Reports screen and rely on the user to select print, the print code will be called directly, which will generate the Invoice Report as a PDF file for each Invoice selected.

Each Invoice will generate a separate pdf on the application server. The files will be generated with the customer name and current date and time as the file name. The destination of the pdf files will be controlled using the existing web server and pdf system parameters.

A new package will be created to write to the server using the UTIL_HOST_CMD to zip all the PDF files into one folder. The procedure AS_TO_CLIENT within the WEBUTIL_FILE_TRANSFER package will be used to move the zipped folder onto the users pc. Once this has been successfully completed, the PDF files will be removed from the server.

The following parameters must be set in the WEBUTIL.CFG

transfer.database.enabled=TRUEtransfer.appsrv.enabled=TRUEtransfer.appsrv.workAreaRoot=c:\temptransfer.appsrv.accessControl=TRUE#Listtransfer.appsrv.read.<n>directoriestransfer.appsrv.read.1=c:\temp#Listtransfer.appsrv.write.<n>directoriestransfer.appsrv.write.1=c:\temp

Table Updates Required


References

Ref No
Document Title & ID
Version
Date
EST-Invoice details - set to approved v0 1.doc
0.1


Document History

Version
Date
Status
Reason
Initials
0.1
Draft
Initial version
sw

AUTHORISED BY

Matt Crisford Development Manager
Peter Greer TMSCC MTS Product Manager