gawri 1/8/2024 8:41:26 PM

Issue with Distribution Type Condition in Payables Transaction Approval Turning to 0 in SQL Query

Hi everyone,
I'm encountering a peculiar issue in the payables transaction approval process and would appreciate any insights or assistance. When I set a condition for the Distribution Type to be any specific value, it consistently defaults to 0 in the generated SQL query. This behavior is unexpected and seems to be an error.

I'm trying to understand the root cause of this issue and how to resolve it. To provide a clearer picture of what I'm experiencing, I've attached some screenshots below that illustrate the problem.

 

 

SQL QUERY:

SELECT 
    [PM10000].[BACHNUMB] AS [Batch Number_1]
    , [PM10000].[VCHNUMWK] AS [Voucher Number_2]
    , [PM10000].[VENDORID] AS [Vendor ID_3]
    , [PM10000].[DOCNUMBR] AS [Document Number_4]
    , [PM10000].[DOCTYPE] AS [Document Type_5]
    , [PM10000].[DOCAMNT] AS [Document Amount_6]
    , [PM10000].[DOCDATE] AS [Document Date_7]
    , [PM10000].[VADDCDPR] AS [Vendor Address Code - Primary_8]
    , [PM10000].[VADCDTRO] AS [Vendor Address Code - Remit To_9]
    , [PM10000].[PYMTRMID] AS [Payment Terms ID_10]
    , [PM10000].[DUEDATE] AS [Due Date_11]
    , [PM10000].[DISCDATE] AS [Discount Date_12]
    , [PM10000].[CHEKBKID] AS [Checkbook ID_13]
    , [PM10000].[TRXDSCRN] AS [Transaction Description_14]
    , [PM10000].[PORDNMBR] AS [P.O. Number_15]
    , [PM10000].[SHIPMTHD] AS [Shipping Method_16]
    , [PM10000].[CURTRXAM] AS [Current Trx Amount_17]
    , [PM10000].[CNTRLTYP] AS [Control Type_18]
    , [PM10000].[MODIFDT] AS [Modified Date_19]
    , [PM10000].[MDFUSRID] AS [Modified User ID_20]
    , [PM10000].[TEN99TYPE] AS [1099 Type_21]
    , [PM10000].[TEN99AMNT] AS [1099 Amount_22]
    , [PM10100].[DSTINDX] AS [Account_23]
    , [PM10100].[DISTTYPE] AS [Distribution Type_24]
    , [PM10100].[VCHRNMBR] AS [Voucher Number_25]
    , [PM00200].[COMMENT1] AS [Comment 1_26]
    , [PM00200].[COMMENT2] AS [Comment 2_27]
    , [PM00200].[VNDCLSID] AS [Vendor Class ID_28]
    , [PM00200].[ACNMVNDR] AS [Account Number With Vendor_29]
    , [PM00200].[PYMNTPRI] AS [Payment Priority_30]
FROM [PM10000] 
    INNER JOIN [PM00200] ON 
        [PM10000].[VENDORID] = [PM00200].[VENDORID] 
    INNER JOIN [PM10100] ON 
        [PM10000].[VCHNUMWK] = [PM10100].[VCHRNMBR] 
WHERE (
    [PM10100].[DISTTYPE] = 0 
 )

Version: All
Section: Dynamics GP, Web Services


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3