Creating Invoices through SDK

I'm new to developing for Sage50. Can anybody explain how to create Sales Invoices through the .NET API? I'm having no luck.

Parents
  • Turns out I was using the 2012 API instead of the 2014 API. This took care of my issue. Thank you.

  • in reply to Kevin_Ryan

    Hi,

    I am using 2012 too. I need to upload daily sales to Sage? I want to know how can I created a sales invoice and populate transactions to specific ledgers?

    can anyone guide please?

    Thanks

  • in reply to jrahma

    Above Bill gave the basic outline of how to create a sales invoice. Within the SDK documentation you can find sample code that shows examples of this.

    A quick example would look something like this:

    SalesInvoice salesInvoice = company.Factories.SalesInvoiceFactory.Create();

    salesInvoice.CustomerReference = customerReference;

    salesInvoice.Date = System.DateTime.Now;

    SalesInvoiceSalesLine lineItem = salesInvoice.AddSalesLine();

    /* Fill in necessary details here */

    salesInvoice.Save();

  • in reply to wood

    Hi,

    I tried:

    SalesInvoice sales_invoice = Company.Factories.SalesInvoiceFactory;

    but getting:

    > Cannot implicitly convert type 'Sage.Peachtree.API.Factories.SalesInvoiceFactory' to 'Sage.Peachtree.API.SalesInvoice'

Reply
  • in reply to wood

    Hi,

    I tried:

    SalesInvoice sales_invoice = Company.Factories.SalesInvoiceFactory;

    but getting:

    > Cannot implicitly convert type 'Sage.Peachtree.API.Factories.SalesInvoiceFactory' to 'Sage.Peachtree.API.SalesInvoice'

Children