Certain transactions not updated on final item

dave.heasman at blueyonder.co.uk dave.heasman at blueyonder.co.uk
Thu Oct 28 10:04:25 CDT 2021


  TEMP QPT-DTL-DR is both defined and a Temp.
This didn't use to be legal?



-----Original Message-----
From: powerh-l <powerh-l-bounces at lists.sowder.com> On Behalf Of James B. Byrne
Sent: 27 October 2021 16:58
To: powerh-l at lists.sowder.com
Subject: Certain transactions not updated on final item

I have a QTP process that selects all the transaction detail lines for a specific account and recalculates the transaction totals.

   SORT ON ACCOUNT-NUMBER OF ACCOUNTS                              &
        ON TRANS-IDENT OF TRANSACTIONS                             &
        ON TRANS-IDENT OF TRANDETL

    DEFINE QPD-DTL-AMT ZONED SIZE 14 = (                           &
      ROUND((AMOUNT OF TRANDETL * 100),0,NEAR))

    TEMP QPT-DTL-AMT ZONED SIZE 14

      ITEM QPT-DTL-AMT SUBTOTAL QPD-DTL-AMT                        &
        RESET AT TRANS-IDENT OF TRANDETL

    TEMP QPT-DTL-CR  ZONED SIZE 14

      ITEM QPT-DTL-CR  SUBTOTAL QPD-DTL-AMT                        &
        IF TRANS-TYPE OF TRANACCT EQ "AP"                          &
        OR TRANS-TYPE OF TRANACCT EQ "CA"                          &
        RESET AT TRANS-IDENT OF TRANDETL

    TEMP QPT-DTL-DR  ZONED SIZE 14

      ITEM QPT-DTL-DR  SUBTOTAL QPD-DTL-AMT                        &
        IF TRANS-TYPE OF TRANACCT EQ "CQ"                          &
        OR TRANS-TYPE OF TRANACCT EQ "DA"                          &
        RESET AT TRANS-IDENT OF TRANDETL

    OUTPUT TRANSACTIONS UPDATE AT TRANS-IDENT OF TRANDETL          &
      ON ERRORS REPORT                                             &
      IF QPG-UPDATE EQ "Y"

      ITEM AMOUNT OF TRANSACTIONS FINAL                            &
        ROUND(((QPT-DTL-AMT) / 100),2,NEAR)

      ITEM CREDIT-AMOUNT OF TRANSACTIONS FINAL                     &
        ROUND(((QPT-DTL-CR) / 100),2,NEAR)

      ITEM DEBIT-AMOUNT OF TRANSACTIONS FINAL                      &
        ROUND(((QPT-DTL-DR) / 100),2,NEAR)


    SUBFILE QPAPBLT1 AT TRANS-IDENT OF TRANDETL KEEP               &
      INCLUDE                                                      &
        TRANSACTIONS,                                              &
        QPT-DTL-AMT, QPT-DTL-DR, QPT-DTL-CR


The problem is that not all transactions are updated as expected:

Quiz reports this in QPAPBLT1:

 Transaction  Amount  QPT-DTL-AMT    Credit   QPT-DTL-CR    Debit   QPT-DTL-DR
  AP036531     485.52       48552    485.52CR      48552     0.00DB          0
  AP036532    1171.79      117179   1171.79CR     117179     0.00DB          0
  CA016586       1.20         120      1.20CR        120     0.00DB          0
  CQ217386       0.00      117179      0.00CR          0  1171.79DB     117179
  DA019461       0.00       48672      0.00CR          0   486.72DB      48672

The last two transactions do not get the AMOUNT set properly, but the DEBIT-AMOUNT is set. I am at a loss as to why.  All three accumulators sum up correctly.  But the FINAL clause does not seem to apply to AMOUNT field of the debit transactions.

What am I missing?

-- 
***          e-Mail is NOT a SECURE channel          ***
        Do NOT transmit sensitive data via e-Mail
   Unencrypted messages have no legal claim to privacy  Do NOT open attachments nor follow links sent by e-Mail

James B. Byrne                mailto:ByrneJB at Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3

--
= = = = = = = = = = = = = = = = = = = = = = = = = = = = Mailing list: powerh-l at lists.sowder.com
Subscribe: 'subscribe' in message body to powerh-l-request at lists.sowder.com
Unsubscribe: 'unsubscribe <password>' in message body to powerh-l-request at lists.sowder.com https://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the list archive at Google.




More information about the powerh-l mailing list