Pastel : Supplier Invoice Import

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • altonsa
    New Member
    • Dec 2020
    • 6

    #1

    Pastel : Supplier Invoice Import

    Hello everyone,

    I am trying to import a CSV into Pastel to do an invoice. I've modelled it according to an example that was exported from Pastel so I have the header and details fields. In spite of this, I'm still getting "first line must be a header" error.

    We tried changing the UTF encoding to something else other than UTF-8 but that gives a Runtime Error so I'm not sure if my CSV has the right encoding. It is generated from PHP dynamic coding that pulls the information from a database and then saved as CSV.

    Can anyone please help? I have attached the file.

    tfc-deliverynote-FLORA-UNITED-PROTEA-FARMS--PTY--LTD.2020-12-10.csv


    Regards,

    Karen
  • Neville Bailey
    Diamond Member

    • Nov 2010
    • 2786

    #2
    Hi Karen,

    I have looked at your CSV file and noticed the following:

    • Cell F1 does not have a period number. If your financial year is February, then the period number will be 9.
    • Cell I1 need to have a Y or an N in it to indicate where or not the invoice lines are VAT inclusive (Y) or VAT exclusive (N).
    • Cell T14 needs to have a value from 0 to 32, to reflect the customer's settlement terms.
    • Cell U1 needs to show the document expiry date.
    • Cell Y1 needs to show the exchange rate of 1 if the system has not been set up for multi-currency).
    • Column D in the Details lines must reflect the exclusive unit selling price.
    • Column E in the Details lines must reflect the inclusive unit selling price.
    • Column N in the Details lines must display as '001 not 1.
    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

    • altonsa
      New Member
      • Dec 2020
      • 6

      #3
      Hi Neville,

      Thank you so much for the feedback. I have made the changes you suggested and sent the CSV to my client. Unfortunately, he's still getting an error. Please see the amended CSV below, as well as the error my client receives. BTW, he is aware of the fact that my product codes do not match his.

      tfc-deliverynote-BUGLERS-POST-FARMS.2020-12-10 v2.csv

      Click image for larger version

Name:	IMG_1182.jpg
Views:	1
Size:	50.8 KB
ID:	265858



      Regards,

      Karen

      Comment

      • altonsa
        New Member
        • Dec 2020
        • 6

        #4
        Hi Neville,

        Any idea on the above?


        Regards,

        Karen

        Comment

        • Kevin Smith
          Silver Member

          • Aug 2018
          • 262

          #5
          Hi Karen

          Your header record is too short. After Exchange rate (your last field "1", you would normally still need Freight method, Ship/Deliver, Additional Costs and the email status. Try adding the below to the end of your header line and see if it will then import:
          ,"","","N"," "

          Your detail lines also need to change. As Neville mentioned, D E and N in the details. Storecode N should be your last value on detail lines, so after you make it "001" you need to remove the additional information on each line
          ,"","","","","","","","","","",""

          You will also need to match the product codes, else the import will fail.
          Kevin Smith
          Sage Pastel Support Consultant
          KS Consulting
          www.ksconsulting.co.za

          Comment

          • altonsa
            New Member
            • Dec 2020
            • 6

            #6
            Hi Kevin,

            Thank you for your reply. We have matched up the product codes to eliminate that as an issue.

            We are however still getting the "first line must be a header" error.

            Here are the two files we've tried. Can you perhaps have a look and help?

            tfc-deliverynote-BUGLERS-POST-FARMS.2020-12-14.csv
            tfc-deliverynote-BUGLERS-POST-FARMS.2020-12-14 v2.csv


            Regards,

            Karen

            Comment

            • Kevin Smith
              Silver Member

              • Aug 2018
              • 262

              #7
              You have something that has been added to the file that isn't recognised or visible, maybe when the PHP writes the file, like special characters or carriage returns, or something along those lines.
              Open the v2 file in notepad. Select all. Open new notepad. Paste and save. File imports into pastel perfectly with no changes. Without doing that, I also get the same error when trying to import the file, so I can only assume it is a hiden character somewhere in the file.
              Kevin Smith
              Sage Pastel Support Consultant
              KS Consulting
              www.ksconsulting.co.za

              Comment

              • altonsa
                New Member
                • Dec 2020
                • 6

                #8
                Hi Kevin,

                Thank you for your help. I've managed to sort out the issue with the Header / Detail error but now I'm getting a new error: The Supplier Invoice Number cannot be blank.

                Here is my latest file:

                sample.csv

                Any ideas?


                Regards,

                Karen

                Comment

                • Kevin Smith
                  Silver Member

                  • Aug 2018
                  • 262

                  #9
                  That would be the Supplier invoice Number - column H / after date in the header section
                  Kevin Smith
                  Sage Pastel Support Consultant
                  KS Consulting
                  www.ksconsulting.co.za

                  Comment

                  • altonsa
                    New Member
                    • Dec 2020
                    • 6

                    #10
                    Hi Kevin,

                    Thanks so much! This did the trick. The import is working now.



                    Karen

                    Comment

                    Working...