How to get rid of an EMPTY value GRN?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • michellepace
    Bronze Member

    • Oct 2018
    • 131

    #1

    [Question] How to get rid of an EMPTY value GRN?

    Hi,

    If I have an erroneous GRN I simply do GRN > into a PN > into a Return&Debit. I have a few completely EMPTY GRN's. I need to get rid of these. However, when I try to pull an empty GRN through to become a PN, pastel does not let me do it. I've attached a few screenshots to show what I mean.

    Question: Does anyone know how I go about getting rid of EMPTY GRN's?

    Thanks
    Michele
    Click image for larger version

Name:	1.Empty.GRN.jpg
Views:	1
Size:	30.8 KB
ID:	269796
    Click image for larger version

Name:	2.jpg
Views:	1
Size:	58.1 KB
ID:	269797
    Click image for larger version

Name:	3.jpg
Views:	1
Size:	54.5 KB
ID:	269798
  • Neville Bailey
    Diamond Member

    • Nov 2010
    • 2786

    #2
    Hi Michelle,

    Good question.

    I don't know of a way to do this, using the standard user interface, so I hope some of the other Pastel gurus on this forum can enlighten me!

    I can, however, get rid of them via the backend of the database, using Pervasive Control Centre, or any other Pervasive database editor like bdbd32.

    Let me know if you would like me to assist you with this.
    Neville Bailey - Sage Pastel Accounting Consultant
    www.accountingsoftwaresupport.co.za
    neville@accountingsoftwaresupport.co.za
    IronTree Online Solutions

    "Give every person more in use value than you take from them in cash value."
    WALLACE WATTLES (1860-1911)

    Comment

    • michellepace
      Bronze Member

      • Oct 2018
      • 131

      #3
      Originally posted by Neville Bailey
      I can, however, get rid of them via the backend of the database, using Pervasive Control Centre, or any other Pervasive database editor like bdbd32. Let me know if you would like me to assist you with this.
      Hi Neville, thanks very much for the offer. I surely do need to get rid of these transactions as I want to change from GRN mandatory to GRN never. I have just pulled 176 supplier invoices through. Shooo. The only ones which remain are those which are completely empty like the attached GRN shows. I have the Pervasive Control centre open. I'm assuming there are a few tables I would need to run a query against. May I ask you to send me the SQL statement to run please?

      The Lost Empty ones:
      GN10408, GN10687, GN10688, GN10728, GN10759, GN10773, GN10900
      Attached Files

      Comment

      • Neville Bailey
        Diamond Member

        • Nov 2010
        • 2786

        #4
        Hi Michelle,

        You will need to open the HistoryHeader data table, and then add the following statement:

        select * from"HistoryHeader"
        where DocumentNumber='GN10408'

        After executing the statement, you can delete the line, and then repeat for each of the other GRNs.
        Neville Bailey - Sage Pastel Accounting Consultant
        www.accountingsoftwaresupport.co.za
        neville@accountingsoftwaresupport.co.za
        IronTree Online Solutions

        "Give every person more in use value than you take from them in cash value."
        WALLACE WATTLES (1860-1911)

        Comment

        • michellepace
          Bronze Member

          • Oct 2018
          • 131

          #5
          Originally posted by Neville Bailey
          select * from"HistoryHeader"
          where DocumentNumber='GN10408'
          Hi Neville, thank you for your reply. I've run the above select statement, but none of my GRN's are in my table. I've ensured I'm pointing to the correct database, and if I don't constrain the statement by DocumentNumber - I do indeed get a whole lot of rows returned. Just none of them contain any of my GRNs. Do you have any other ideas?

          If not... do you think if I simply force the setting regardless that there are empty GRNs.. it will be okay?
          Code:
          Update "CustSuppParameters"
          Set UseGrn = 0;

          Comment

          • Neville Bailey
            Diamond Member

            • Nov 2010
            • 2786

            #6
            That's odd.

            Perhaps search for your GRNs in the HistoryLines data table instead, although I would not expect them to appear there, as they should not have any line items.
            Neville Bailey - Sage Pastel Accounting Consultant
            www.accountingsoftwaresupport.co.za
            neville@accountingsoftwaresupport.co.za
            IronTree Online Solutions

            "Give every person more in use value than you take from them in cash value."
            WALLACE WATTLES (1860-1911)

            Comment

            • michellepace
              Bronze Member

              • Oct 2018
              • 131

              #7
              Hi Neville. No I'm afraid the below statement returns nothing for both HistoryLines and HistoryHeader.

              select * from "HistoryLines"
              where documenttype = 7
              And documentnumber in ('GN10408','GN10687','GN10688','GN10728','GN10759' ,'GN10773','GN10900');

              Comment

              • Kevin Smith
                Silver Member

                • Aug 2018
                • 262

                #8
                The document number field is an 8 character field. You will need to pad the documents with the leading blank space, ie ' GN10408'
                Kevin Smith
                Sage Pastel Support Consultant
                KS Consulting
                www.ksconsulting.co.za

                Comment

                • michellepace
                  Bronze Member

                  • Oct 2018
                  • 131

                  #9
                  Neville this is very strange. I've just done GN11451 in pastel. If you look at the attached screenshot, provided I don't specify the documentnumber, I see GN11451. But as soon as I specify the DocumentNumber "GN11451", I get no results back.

                  Any ideas? (at least I am querying the correct dB )

                  Click image for larger version

Name:	screenshot.png
Views:	1
Size:	33.8 KB
ID:	265740

                  Comment

                  • Kevin Smith
                    Silver Member

                    • Aug 2018
                    • 262

                    #10
                    See above about padding you GN numbers with a space
                    Kevin Smith
                    Sage Pastel Support Consultant
                    KS Consulting
                    www.ksconsulting.co.za

                    Comment

                    • michellepace
                      Bronze Member

                      • Oct 2018
                      • 131

                      #11
                      Eurika!!! Thanks Kevin

                      Click image for larger version

Name:	Delete - successful.png
Views:	1
Size:	25.5 KB
ID:	265741

                      Comment

                      • Neville Bailey
                        Diamond Member

                        • Nov 2010
                        • 2786

                        #12
                        Excellent news.

                        Thanks, Kevin, for the input!
                        Neville Bailey - Sage Pastel Accounting Consultant
                        www.accountingsoftwaresupport.co.za
                        neville@accountingsoftwaresupport.co.za
                        IronTree Online Solutions

                        "Give every person more in use value than you take from them in cash value."
                        WALLACE WATTLES (1860-1911)

                        Comment

                        • michellepace
                          Bronze Member

                          • Oct 2018
                          • 131

                          #13
                          The safest way to do it:
                          1. Make a backup of the company via the front end
                          2. Run a select statement (with the delete line commented out)
                          3. If the right thing was selected, comment out the select statement and un-comment the delete line in it's place.
                          Code:
                          select * from "HistoryHeader"
                          [COLOR="#006400"]//Delete from "HistoryHeader"[/COLOR]
                          where documenttype = 7
                          And Documentnumber in (' GN11563')

                          Comment

                          Working...