6 Replies Latest reply on Jan 3, 2020 6:14 PM by 4109584

    Accounts Payables->Add/Update->Voucher Regular Entry:VCHR_PNLS_WRK.SPEEDCHART_KEY Hidden in PUM Image 32 Vs PUM Image 11

    3024707

      Delivered within PUM Image 32 there is new code to hide VCHR_PANELS_WRK.SPEEDCHART_KEY based on what voucher style a user has. Can someone tell me why this was added since it wasn't delivered within PUM Image 11? What is it's true purpose? Is there any harm with removing it from production going forward?

       

      New Code:VCHR_EXPRESS.GBL.VCHR_PANELS_WRK.RowInit.VCHR_PANELS_WRK.SPEEDCHART_KEY.RowInit

       

      Component string &tag_option_vchr, &ACCOUNT_TAG_FLG, &SPEEDCHART_FLG;

       

       

      &panel_wrk = GetRecord(Record.VCHR_PANELS_WRK);

       

       

      Evaluate VOUCHER.VOUCHER_STYLE.Value

      When "PPAY"

      When "CORR"

         &panel_wrk.ACCOUNT_CODE.Visible = False;

         &panel_wrk.SPEEDCHART_KEY.Visible = False;

         Break;

      When "REG"

      When "SGLP"

      When "TMPL"

      When "JRNL"

      When "AMR"

         &panel_wrk.ACCOUNT_CODE.Visible = False;

         &panel_wrk.SPEEDCHART_KEY.Visible = False;

         If &tag_option_vchr = "Y" Then

            If &ACCOUNT_TAG_FLG <> "N" Then

               &panel_wrk.ACCOUNT_CODE.Visible = True;

            End-If;

         Else

            If &SPEEDCHART_FLG <> "N" Then

               &panel_wrk.SPEEDCHART_KEY.Visible = True;

            End-If;

         End-If;

         Break;

      When-Other

         If &tag_option_vchr = "Y" Then

            &panel_wrk.ACCOUNT_CODE.Visible = True;

            &panel_wrk.SPEEDCHART_KEY.Visible = False;

         Else

            &panel_wrk.ACCOUNT_CODE.Visible = False;

            &panel_wrk.SPEEDCHART_KEY.Visible = True;

         End-If;

         Break;

      End-Evaluate;

       

       

       

       

      /* Code related to UPN */

      Evaluate VOUCHER.VOUCHER_STYLE.Value

      When "PPAY"

      When "REG"

      When "ADJ"

      When "CORR"

         &rsVchrLine = GetLevel0()(1).GetRowset(Scroll.VOUCHER_LINE);

         For &i = 1 To &rsVchrLine.ActiveRowCount

            If (All(&rsVchrLine.GetRow(&i).VOUCHER_LINE.PO_ID.value) Or

                  All(&rsVchrLine.GetRow(&i).VOUCHER_LINE.RECEIVER_ID.value) Or

                  All(&rsVchrLine.GetRow(&i).VOUCHER_LINE.CNTRCT_ID.value)) Then

               &rsVchrLine.GetRow(&i).VCHR_PANELS_WK1.UPN_PB.Visible = True;

               If None(&rsVchrLine.GetRow(&i).VOUCHER_LINE.INV_ITEM_ID.value) Or

                     (&rsVchrLine.GetRow(&i).VOUCHER_LINE.INV_ITEM_ID.enabled = False) Then

                  &rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ID.enabled = False;

                  &rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ITM_ID.enabled = False;

                  &rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_TYPE_CD.enabled = False;

                  &rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_ID.enabled = False;

               Else

                  SQLExec("SELECT COUNT(*) from PS_VCHR_UPN_DEF_VW where INV_ITEM_ID = :1", &rsVchrLine.GetRow(&i).VOUCHER_LINE.INV_ITEM_ID.value, &count);

                  If &count = 0 And

                        None(&rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ID.value) And

                        None(&rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ITM_ID.value) And

                        None(&rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_TYPE_CD.value) And

                        None(&rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_ID.value) Then

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ID.enabled = False;

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ITM_ID.enabled = False;

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_TYPE_CD.enabled = False;

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_ID.enabled = False;

                  Else

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ID.enabled = True;

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.MFG_ITM_ID.enabled = True;

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_TYPE_CD.enabled = True;

                     &rsVchrLine.GetRow(&i).VOUCHER_LINE.UPN_ID.enabled = True;

                  End-If;

               End-If;

            Else

               &rsVchrLine.GetRow(&i).VCHR_PANELS_WK1.UPN_PB.Visible = False;

            End-If;

         End-For;

         Break;

      When-Other

         &rsVchrLine = GetLevel0()(1).GetRowset(Scroll.VOUCHER_LINE);

         For &i = 1 To &rsVchrLine.ActiveRowCount

            &rsVchrLine.GetRow(&i).VCHR_PANELS_WK1.UPN_PB.Visible = False;

         End-For;

         Break;

      End-Evaluate;