Announcement

Collapse
No announcement yet.

[SOLVED] How do you delete a Voucher?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] How do you delete a Voucher?

    I have some orders that have been created in the wrong domain and we need to remove them. The problem is that the buy shipment has an invoice and a voucher that has been allocated. How do you remove such a voucher in OTM?
    Thanks,
    Runi

  • #2
    Deleting a Voucher

    To delete a voucher, you need to UNAPPROVE INVOICE from the invoice action menu. If this doesn't work for you, then you may need to manually delete the entries from the allocation tables, which we've had to do in the past, on occasion.

    Comment


    • #3
      Hi Yun,
      Unapproving an invoice creates another voucher and I am trying to get rid of the voucher and the invoice so that I can delete the buy shipment and the order release.
      Which allocation tables do you manually delete the voucher in?
      Thanks,
      Runi

      Comment


      • #4
        Runi,
        I'm sorry...when I looked back at my notes and re-read your posting, our issues was elsewhere. We had problems deleting order releases due to the allocation tables, not vouchers.
        Yun

        Comment


        • #5
          Figured it out.
          See delete statmens below that should be executed in SQL as the user glogowner, you need to know the order release gid, the shipment gid and the voucher gid.


          DELETE FROM ALLOCATION_ORDER_RELEASE_D
          WHERE ORDER_RELEASE_GID in ('RHL.27-13048','RHL/MBUSA.38-439118');
          DELETE FROM ALLOCATION_D
          WHERE
          ORDER_RELEASE_GID in ('RHL.27-13048','RHL/MBUSA.38-439118');
          DELETE FROM ALLOCATION
          WHERE
          ORDER_RELEASE_GID in ('RHL.27-13048','RHL/MBUSA.38-439118');
          DELETE FROM VOUCHER_STATUS
          WHERE
          VOUCHER_GID in ('RHL.20051207-0093');
          DELETE FROM VOUCHER_REFNUM
          WHERE
          VOUCHER_GID in ('RHL.20051207-0093');
          DELETE FROM VOUCHER_INVOICE_LINEITEM_JOIN
          WHERE
          VOUCHER_GID in ('RHL.20051207-0093');
          DELETE FROM ALLOCATION_BASE
          WHERE
          SHIPMENT_GID ='RHL.03800';
          DELETE FROM VOUCHER
          WHERE
          VOUCHER_GID in ('RHL.20051207-0093');

          Commit;

          Comment

          Working...
          X