My Oracle Support Banner

Issues In Generating Multiple Work Invoices After Cancellation (Doc ID 1370647.1)

Last updated on JULY 20, 2024

Applies to:

Oracle Transportation Management - Version 6.1.5 and later
Information in this document applies to any platform.

Symptoms


When generating 2 or more Work Invoices after a Work Invoice has been cancelled, The Generate Work Invoice creates 2 Invoices instead of one and the 2nd one is missing the status. The client expects only 1 work invoice to get created. It also appears the numbers are wrong on the work invoice Number.

In Summary - the following issues occur:
1. After Generating 2 invoices after voiding, 2 invoices generate
2. The 2nd invoice is missing the status.
3. A null pointer is received.
4. The Invoice numbers are incorrect

STEPS
-----------------------
The issue can be reproduced at will with the following steps:
Setup:

Created Special Service: EXP_MEAL

Created Order: WORK_CANCEL1

Created Direct Shipment: 01540

Assigned Driver: SPECIAL_DRIVER

Added Special Service EXP_MEAL to shipment 01540.
To Replicate:

1. Log into OTM.
2. Search for Shipment 01540.
3. Select and go to > Actions > fleet Management > Driver Dispatch > Generate
Driver Work Invoice.
4. Note Work Invoice SPECIAL_DRIVER-01540-01 was created.
5. Click to Edit the Work Invoice and note the following activity:
Activity Date Special Service Source Location Destination Location Payable
Indicator
2011-09-07 LOAD KSOURCE KSOURCE PAYABLE
2011-09-07 DEADHEAD KDEST KSOURCE PAYABLE
2011-09-07 EXP_MEAL KSOURCE KSOURCE PAYABLE
2011-09-08 UNLOAD KDEST KDEST PAYABLE
2011-09-08 TRANSPORT KSOURCE KDEST PAYABLE

The statuses are as follows:

WORK_INVOICE_SENT WORK_INVOICE_SENT_RECEIVED
WORK_INVOICE_VALID WORK_INVOICE_VALID_VALID
6. Now Cancel the work invoice by selecting the Work Invoice and go to >
Actions > Cancel Work Invoice.

7. Note a 2nd Work Invoice, SPECIAL_DRIVER-01540-02, was created showing the
following:

Activity Date Special Service Source Location Destination Location Payable
Indicator
2011-09-07 LOAD KSOURCE KSOURCE PAYABLE_ZERO
2011-09-07 DEADHEAD KDEST KSOURCE PAYABLE_ZERO
2011-09-07 EXP_MEAL KSOURCE KSOURCE PAYABLE_ZERO
2011-09-08 UNLOAD KDEST KDEST PAYABLE_ZERO
2011-09-08 TRANSPORT KSOURCE KDEST PAYABLE_ZERO
The statuses are as follows:

WORK_INVOICE_SENT WORK_INVOICE_SENT_RECEIVED
WORK_INVOICE_VALID WORK_INVOICE_VALID_REVERSAL

8. Now Generate a New Work Invoice on the shipment and note Invoice.

9. Click to Edit the Work Invoice and note the following activity:
Activity Date Special Service Source Location Destination Location Payable
Indicator
2011-09-07 LOAD KSOURCE KSOURCE PAYABLE
2011-09-07 DEADHEAD KDEST KSOURCE PAYABLE
2011-09-07 EXP_MEAL KSOURCE KSOURCE PAYABLE
2011-09-08 UNLOAD KDEST KDEST PAYABLE
2011-09-08 TRANSPORT KSOURCE KDEST PAYABLE

The statuses are as follows:

WORK_INVOICE_SENT WORK_INVOICE_SENT_RECEIVED
WORK_INVOICE_VALID WORK_INVOICE_VALID_VALID

10. Go back to the shipment and create 1 more work invoic - note the invoice
shows as number SPECIAL_DRIVER-01540-05 (not -04 as expected).

11. If you go to Fleet Management --> Driver Work Invoice and search by
shipment ID 01540, you will see that the that a -04 was created along with
the -05 even though only 2 invoices were generated after the cancelation.

Also - If you click on the status of work invoice SPECIAL_DRIVER-01540-05,
you wil lsee the WORK_INVOICE_VALID status is missing and only the one below
exists (I think it only exists because I tell an agent ot set that -
otherwise neither might exist)

WORK_INVOICE_SENT WORK_INVOICE_SENT_RECEIVED

12. I created another work invoice and see 2 more were created - 6 and 7. In
addition, the error below shows (I'm assuming due to the missing status - but
still 2 invoices were created)

At 2011-08-30 16:42:47.784
java.lang.NullPointerException

java.lang.NullPointerException
at
glog.server.workflow.status.workinvoice.EditWorkInvoice.canPerformWithCauses(E
ditWorkInvoice.java:38)
at
glog.server.workflow.status.workinvoice.EditWorkInvoice.canPerform(EditWorkInv
oice.java:30)
at glog.server.status.StatusPerformer.canPerform(StatusPerformer.java:84)
at glog.server.status.Status.canPerform(Status.java:80)
at
glog.ejb.workinvoice.db.WorkInvoiceBeanDB.canPerform(WorkInvoiceBeanDB.java:35
9)
at
glog.ejb.workinvoice.WorkInvoiceServerSideEJBWrapper.canPerform(WorkInvoiceSer
verSideEJBWrapper.java:801)
at
glog.ejb.workinvoice.ejb_WorkInvoice_hx1f6a_EOImpl.canPerform(ejb_WorkInvoice_
hx1f6a_EOImpl.java:1884)
at
glog.business.action.invoice.WorkInvoiceActionExecutor.updateWorkInvoice(WorkI
nvoiceActionExecutor.java:616)
at
glog.business.action.invoice.WorkInvoiceActionExecutor.generateDriverWorkInvoi
ce(WorkInvoiceActionExecutor.java:169)
at
glog.business.invoice.WorkInvoiceServerActionSessionBean.generateWorkInvoice(W
orkInvoiceServerActionSessionBean.java:57)
at
glog.business.invoice.WorkInvoiceServerActionSessionServerSideEJBWrapper.gener
ateWorkInvoice(WorkInvoiceServerActionSessionServerSideEJBWrapper.java:52)
at
glog.business.invoice.WorkInvoiceServerActionSessionServerSideEJBWrapper_pb92k
v_EOImpl.generateWorkInvoice(WorkInvoiceServerActionSessionServerSideEJBWrappe
r_pb92kv_EOImpl.java:207)
at
glog.business.invoice.WorkInvoiceServerActionSessionServerSideEJBWrapper_pb92k
v_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:590)
at
weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230
)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at
weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:119)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

13. If you click on the status of the SPECIAL_DRIVER-01540-07 work invoice,
you will see again only the following status shows:
WORK_INVOICE_SENT WORK_INVOICE_SENT_RECEIVED

14. Finally, if you look at the invoice numbers when searching by shipment ID
01540, you will see the Work Invoice Number Skips around. In this case the
following is shown after doing the search:

SPECIAL_DRIVER-01540-01 01540-01
SPECIAL_DRIVER-01540-02 01540-01
SPECIAL_DRIVER-01540-03 01540-02
SPECIAL_DRIVER-01540-04 01540-03
SPECIAL_DRIVER-01540-05 01540-02
SPECIAL_DRIVER-01540-06 01540-04
SPECIAL_DRIVER-01540-07 01540-03

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.