Forum
See question

Desconto em valor (amount)   

20 views
0
0

Olá, pessoal.

Tenho uma dúvida sobre o envio de descontos via API.
Atualmente usamos o campo discount para o cabeçalho da fatura e discount1 para as linhas, porém ambos os campos aceitam apenas percentual e não um valor fixo.

Poderiam, por favor, informar qual campo do JSON podemos utilizar para enviar o desconto em valor (amount) em vez de percentual ao utilizar o endpoint billing/invoices?

Agradeço antecipadamente pelo suporte.

Faça login para poder traduzir
API Endpoints
Integration
Jasmin
Marked as spam
Created 5 months and 4 weeks ago andreaflamini
a
andreaflamini Andrea Flamini Iniciante
1 answers
0
Private answer

Hello Andrea,
I'm not sure want you mean by "send de amout discount".
Just to clarify, in Jasmin you have 2 ways of  setting a discount:

1 - In percentage 
At the document's general data and at each document line (where you can set up to 3 incremental discounts  - this ones will be applied cumulatively to the discount seted at the document's general data).

2- In value
At the document's general data in the "Financial" Expander, in attribute "Discount in Value"
This will also be applied in a cumulative way to the discounts defined at 1 (in percentage) but there is no way for you to set the discount in value for each document line (you cannot do by WebAPI an operation not supported by the application).
Regarding this case, be sure you know want you are doing when using this attribute. The way the value is used in calculations, depends on either or not your document prices are "Tax Inclusive" (be sure to make some tests in the application interface in order to validate what you are trying to achive).

If you do want do use the "discountinvalue" attribute, it is included at the WebApi documentation

https://jasminsoftware.github.io/billing.invoices.html#ApiInvoiceResource

Attribute "discountInValueAmount" (keep in mid that this attribute is a MoneyResource)

Faça login para poder traduzir
Marked as spam
Created 5 months and 4 weeks ago eduardosilva
e
eduardosilva Eduardo SILVA Responsiveness Member