Invoice creation problem when using Github project

Asked

Viewed 97 times

-5

After implementing the aforementioned amendments, I was able to solve the problems of the remaining fields but a new problem arose. After modifying the code for the following...

private static InvoiceResource CreateSampleInvoice()
        {
            return new InvoiceResource
            {
                Company = "GRG",
                Customer = "ALCAD",
                Lines = new List<InvoiceLineResource>
                    {
                        new InvoiceLineResource
                        {
                            Item = "0001",
                            Quantity = 1,
                            Description = "Item 0003 custom description.",
                            Price = new MoneyResource { Value = 50 }
                        }
                    }
            };
        }

I made this mistake:

inserir a descrição da imagem aqui

I have to add the "Warehouse" field manually in the "Invoicelineresource.Cs" file and in this field too?

  • @Fábio this data "Company" and "entity" are not correct, that’s what he is saying.

  • @Fábio, I just tested with the example that you are using csharp-createinvoice-sample and I was able to create the invoice without problem. Of course I had to adjust my company and client data to be able to validate.

  • @Sérgiosereno could please make me get where you got from the Asmin software, these fields?

  • The fields are the abbreviation (of the company), the article (of the article) and the entity (of the client).

  • @Fábio This is a new question. You should not change the content of questions because if not the answers no longer make sense.

  • Reset the original question please.

Show 1 more comment

1 answer

0


to create a webapi invoice in an billing application you have to comply with some requirements, see:

  • Create a company (all transactions are within the ambit of a company)
  • Create the entity for who will invoice and goods/service that will invoice.
  • Have an active and valid series.

To create a company.

  • Configuration | General | Companies | Create. The code you give the company you must associate with the property Company.

For the Entity

  • Sales | Customers. The code you give to the customer you have to associate to the property Customer.

For article

  • Sales | Articles of Sale. The code you give to the customer you have to associate to the property Item.

In my case.

private static InvoiceResource CreateSampleInvoice()
{
    return new InvoiceResource
    {
        Company = "default",
        Customer = "0001",
        Lines = new List<InvoiceLineResource>
            {
                new InvoiceLineResource
                {
                    Item = "0003",
                    Quantity = 2,
                    Description = "Item 0003 custom description.",
                    Price = new MoneyResource { Value = 50 }
                }
            }
    };
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.