Forum Discussion

GRSeach's avatar
GRSeach
Experienced User
1 year ago
Solved

Error 28, "Item is not sold" when importing item sale from CSV

AccountRight Premier v19.16 (19.16.1.225770).

 

I'm a retired VB developer who's been asked to automate invoice creation in MYOB, from a bunch of Excel sheets.

 

In Excel VBA, I've extracted the data from the source files and have created separate CSV files for users to import into MYOB, one for each sale. I did it that way because MYOB will not give us an ODBC read-write key (thanks to our MYOB version no longer being supported), and I have no expertise with the REST API. This is just the way it has to be.

 

All inventory items exist in MYOB and although they are marked as being sold, they are not inventoried, consequently their quantity on hand is zero. The CSV does include a quantity sold.

 

When I import the CSV, I get the "Item is not sold", error 28. I've opened the CSVs in Excel and have verified that the Item No is correct and where it should be. Nothing is obviously out of place. The CSV contains no extra eous rows. What should I look for?

 

By the way, normally I would attach an example of the CSV so you can check my work, but we recently got live hacked, so all my computers are offline and I can't (don't dare) connect one to another to grab a file. I bought a new tablet so I could at least lodge this question.

 

I've done a lot of research on this, but none of it has been successful. I'm running out of time on this one. I hope you can help. Thanks in advance.

 

Graham

  • Hi GRSeach 

     

    Your opening comment indicated you were using v19.16 - please confirm, as this error is more common with AR2024.

     

    Also rather than providing snippets of info, attach the import file and the importlog file which shows what transaction caused the error. Importing is a complex process, and the slightest thing can cause an error.

     

    Suggest you also go through the tax codes and ensure every tax code that you use have a linked account for tax paid and tax collected.

     

    Regards

    Gavin

18 Replies

  • GRSeach's avatar
    GRSeach
    Experienced User
    1 year ago

    Hi gavin12345 ,

     

    Thanks for getting back to me.

     

    I confirm we're using v19.16.

     

    Also, as I mentioned in my original post, normally I would attach an example of the CSV so you can check my work, but we recently got live hacked, so all my computers are offline and I can't (don't dare) connect one to another to grab a file. I bought a new tablet so I could at least lodge this question and get at a standby email account. That being said, I am using my laptop to develop the code, and an attached USB drive on which I'm running a VM for MYOB, but my laptop is in airplane mode. I don't have a way to transfer files between devices. For some reason, both USB and Bluetooth options are failing. This is all very inconvenient, but we do what we have to do, and work with the cards we're dealt, right?

     

    As for going through tax codes and linked accounts - I'll have to ask someone else to do that. I'm a software good developer, but I don't know squat about MYOB.

     

    I'll get someone to do as you suggest, and will report back.

     

    Thanks so much.

     

    Graham

  • GRSeach's avatar
    GRSeach
    Experienced User
    1 year ago

    Hi gavin12345 ,

     

    I had a poke around in MYOB and found the Tax Code list. On further poking around, I was able to link accounts for tax paid and received. That solved the problem. I can now successfully import sales!

     

    Thank you.

     

    Graham

  • GRSeach's avatar
    GRSeach
    Experienced User
    1 year ago

    Hi gavin12345 ,

     

    Actually, the original problem hasn't been completely resolved.

     

    I found that some CSV files import into MYOB without issue, but others fail with Error 28, "Item is not sold". Frustratingly, I can successfully create a manual sale using the exact same data from a failing CSV. This behaviour is consistent, but I can't see any difference between a successful item and a failing one, but then, I'mdon't know a lot about MYOB.

     

    Is there anything I should look for?

     

    Graham

  • gavin12345's avatar
    gavin12345
    Ultimate User
    1 year ago

    Hi GRSeach 

     

    Another user reported imports fail when the Item (or Customer perhaps) is set to GNR instead of GST. Check to see if this can help identify the consistency.

     

    Regards

    Gavin

  • GRSeach's avatar
    GRSeach
    Experienced User
    1 year ago

    Hi gavin12345 .

     

    It was worth a shot, but they're all set to EXP.

     

    Keeping in mind that while sale imports for some items succeed and others fail, could it be something to do with the fact that none of the items in MYOB are inventoried? This is a drop-ship business and all customers are overseas (hence the tax code). I wasn't able to add inventory and I can't set them as inventoried because sales already exist for those items. All the items are active.

     

    Graham

  • gavin12345's avatar
    gavin12345
    Ultimate User
    1 year ago

    Hi GRSeach 

     

    You can import Items sales whether you inventory the items or not so this would not be the issue. You are likely missing one field that you need. I take it you have checked that the item is marked as I Sell and you have a tax code for Selling. 

     

    Regards

    Gavin

  • GRSeach's avatar
    GRSeach
    Experienced User
    1 year ago

    Hi gavin12345 ,

     

    All items are marked for sale, but not for purchase.

     

    During more testing, I've discovered that the problem seems to be limited to one related class of products, whose product numbers all begin with the same 7 characters (no spaces). I'm going onsite tomorrow, so I'll ask them to investigate why these particular products might be problematic.

     

    If I find out, I'll report back here so you and others might benefit.

     

    Graham

  • Earl_HD's avatar
    Earl_HD
    MYOB Moderator
    1 year ago

    Hi GRSeach,

    Thanks for your post, and my apologies for the late response.

    I would like to check if you're still having this issue? We're pleased to hear that Mike and Gavin are assisting you with this issue. Please don't hesitate to reach out again if you have any further queries, and one of us will be delighted to assist you!

     

    Regards,
    Earl