DHL Invoicing

From Calidus HUB
Revision as of 16:17, 21 August 2025 by Anw (talk | contribs) (Initial Creation)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

DHL Invoicing

The invoicing is transactional so requires data extracted from each system.

DHL Invoicing – CTMS

Each server has a crontab entry to run the processing on the 1st of the month. It runs at 0421.

#Entry for DHL monthly invoicing

21 4 1 * * /oraapp/util/sql/dhl_invoicing >> /tmp/dhl_invoicing

The script calls a database process called DP_DHL_INVOICING.RUN_ME

Using the oratab entries (active systems) the script will run against each live database.

The package code is in CVS and should be maintained through the standard code change procedures.

A system parameter called DHL_INV_EMAIL which contains the list of email addresses to send the output to. Multiple entries should be separated with a semi-colon.


The processing runs slightly different iterations of the queries depending on the system. The queries were split into groups based on the agreed costing models.

There is also a listing of users.

Each database will send an email with an attachment which contains tab separated data. It can be pasted directly into Excel.

DHL Invoicing – LOTS

There is a stored procedure in the MySQL database called dhl_invoicing that contains the SQL.

A bat file D:\LOTS\Invoicing\invoicing.bat runs the stored procedure and emails the file created. The file is then deleted (MySQL cannot overwrite a file).

The list of email addresses is hard coded but it is just a text file that can be edited as required.

The bat file runs from the Windows task scheduler on the first of the month at 0421