Import Sales Invoice using imp file

SOLVED

I was wondering if there was a way to create sales invoice that have discounts using the import feature?  I create my sales using our POS and I wanted to import the sales/refunds from our system to SAGE 50 accounting.  I'm able to create the imp file with the data from our POS for each transaction, problem is the sales that include discounts I'm not able to add the discount%, even if I select the customer that has std discount.  Is the only way to do this is using the SDK then?  Can someone point me to some sample creation of sales invoice using the SDK?

Thanks,

Alex

Parents
  • 0
    verified answer

    Alex79 said:
    Can someone point me to some sample creation of sales invoice using the SDK?

    In the Sample\c# folder of the SDK, there should be 'SDKExample.csproj'.

    Under Main (Somewhere around line 1518) you can change the examples that are commented out, to compile and run ProcessOrdersQuotesExample()

    public static void ProcessOrdersQuotesExample() starts around line 1296.  

    public static void ProcessInvoicesExample() starts at line 1082

    According to the dev-dotnetref.chm  (use control-+ to zoom unless you wear jeweler's glasses) there is mention of the discount method:

    InvoiceJournal.SetDiscountAmount Method

    public double SetDiscountAmount(

    double amount

    And reading further down in the sample sales journal entry, to line 1219:

    salJourn.SetFreightAmount(0.00);

    salJourn.SetDiscountRate(5.00);

    **************************************************

    The SDK is fairly complete, although the documentation just cries out for a 'readme' and a 'Getting Started' guide for people like me.

    Rather than what I did:

     - work with a copy of the SDK Sample folder, and a copy of the Sage 50 Sample File. Write a short batch

    (and you won't have to remove and reinstall to get the original samples back after you test)

     - I found it helped speed up the testing as well, to set some of the file and password names in the code.  

     - the default username for the Sage samples is 'sysadmin'.  All lower case.  

     - The maximum password length in Simply Accounting / Sage 50, is 7 characters.  Sending more than 7 characters from the SDK will run it through the hash algorithm without an error message and then fail to match 100% of the time.  So if you're using 'Password' to test, use 'Passwor' in the SDK.

Reply
  • 0
    verified answer

    Alex79 said:
    Can someone point me to some sample creation of sales invoice using the SDK?

    In the Sample\c# folder of the SDK, there should be 'SDKExample.csproj'.

    Under Main (Somewhere around line 1518) you can change the examples that are commented out, to compile and run ProcessOrdersQuotesExample()

    public static void ProcessOrdersQuotesExample() starts around line 1296.  

    public static void ProcessInvoicesExample() starts at line 1082

    According to the dev-dotnetref.chm  (use control-+ to zoom unless you wear jeweler's glasses) there is mention of the discount method:

    InvoiceJournal.SetDiscountAmount Method

    public double SetDiscountAmount(

    double amount

    And reading further down in the sample sales journal entry, to line 1219:

    salJourn.SetFreightAmount(0.00);

    salJourn.SetDiscountRate(5.00);

    **************************************************

    The SDK is fairly complete, although the documentation just cries out for a 'readme' and a 'Getting Started' guide for people like me.

    Rather than what I did:

     - work with a copy of the SDK Sample folder, and a copy of the Sage 50 Sample File. Write a short batch

    (and you won't have to remove and reinstall to get the original samples back after you test)

     - I found it helped speed up the testing as well, to set some of the file and password names in the code.  

     - the default username for the Sage samples is 'sysadmin'.  All lower case.  

     - The maximum password length in Simply Accounting / Sage 50, is 7 characters.  Sending more than 7 characters from the SDK will run it through the hash algorithm without an error message and then fail to match 100% of the time.  So if you're using 'Password' to test, use 'Passwor' in the SDK.

Children
  • 0 in reply to RandyW

    Thank I just saw that.  I think best solution then would be to use the SDK for creating Invoices, since the other problem is the line item description is not available.  I just wanted to use the API for the POS I have which is written in Ruby, so I was writing ruby code to write the .imp files with appropriate data.  Fortunately I can grab that data through JSON objects they have available, this way it will be cleaner too since no need to run import app, I just retrieve data uising JSON then send data to Sage using the SDK method.

    Thanks Randy and Richard for your fast reply

    Alex

  • 0 in reply to Alex79

    Well I hit another hurdle...The SDK doesn't have a way to add opening balances for inventory.  Other than using something like autohotkey anyone got a way to setup 8000+ inventory items with their stock on hand and opening balance?

    Accounts and suppliers opening balance is not too bad since there isn't too many but would be nice.

    Alex

  • 0 in reply to Alex79

    Ok I was wrong, there is a way through SDK, using the Database utility class.

    something like

    int ret = util.RunNonQuery("UPDATE tInvByLn SET dHCostStk = 49.95, dHInStock = 60 Where lInventId = 1414 ");

    Alex

  • 0 in reply to RandyW
    Hi, how do one open an .imp file? Is there a particular program to use?? I downloaded the SDK, I looked at the manuals, but I cannot open the samples. How does one actually create an imp file? (I want to import sales invoices). Thanks!
  • 0 in reply to MicheleJ

    The .IMP file is a plain text, formatted file. There is no binary (non-ASCII) component.

    .IMP files from Sage 50 / Simply Accounting can be opened with Notepad, and will automatically open with Sage 50 / Simply Accounting.  Be careful not to change the default program that Windows will open the file with.
     
    If you set Windows to show extensions, or work from a command prompt, it's easier to follow which extension the file has.