#53 R2.5.1b: Cash Journal Balance not updated

R2.5.1
closed-fixed
5
2004-05-18
2004-05-12
Jorg Janke
No

When paying by Cash (e.g. via a POS order), the running
total on the header is not updated making it hard to
reconcile the cash status.

Cause: Update trigger deleted as replaced by Java, but
by default the Cash Journal entry is created by PL/SQL.

Fix: Re-create trigger. No side effects other that some
calculations are done twice.

Discussion

  • Jorg Janke

    Jorg Janke - 2004-05-12

    Cash Line Trigger

     
  • Jorg Janke

    Jorg Janke - 2004-05-12

    Logged In: YES
    user_id=87038

    The code of the "old" trigger is attached.
    --
    This updates the balances:
    SQL>

    UPDATE C_Cash c
    SET StatementDifference=
    (SELECT COALESCE(SUM(C_Currency_Convert(cl.Amount,
    cl.C_Currency_ID, cb.C_Currency_ID, c.DateAcct, null,
    c.AD_Client_ID, c.AD_Org_ID)),0)
    FROM C_CashLine cl, C_CashBook cb
    WHERE cb.C_CashBook_ID=c.C_CashBook_ID
    AND cl.C_Cash_ID=c.C_Cash_ID)
    WHERE Processed<>'Y';

    UPDATE C_Cash
    SET EndingBalance = BeginningBalance +
    StatementDifference
    WHERE Processed<>'Y';

    COMMIT;

     
  • Jorg Janke

    Jorg Janke - 2004-05-12

    Logged In: YES
    user_id=87038

    .. forgot the first SQL statement:

    UPDATE C_CashLine cl
    SET C_Currency_ID = (SELECT C_Currency_ID FROM
    C_Invoice i
    WHERE cl.C_Invoice_ID=i.C_Invoice_ID)
    WHERE C_Currency_ID IS NULL AND C_Invoice_ID IS NOT
    NULL;

     
  • Jorg Janke

    Jorg Janke - 2004-05-18
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks