#.dylana

1 messages · Page 1 of 1 (latest)

fleet swallowBOT
serene moon
#

Hello 👋
What do you mean by siret number exactly?

#

Ah its something France specific

dreamy needle
#

yes it is

#

here is an exemple of what i want to do

serene moon
#

I don't think we have a separate field for the SIRET number
Are you looking to create quotes and invoices via the API or the Dashboard?

dreamy needle
#

api

dreamy needle
#

but could I set custom the style using html or special characters like \n

serene moon
#

I don't think those fields support anything other than text format, so no. You can't use custom styling unfortunately.

dreamy needle
#

oh

#

and another thing when accepting a quote does the invoice will be generated with the same information used in the quote ?

serene moon
#

I believe so, yes.
You can give it a try in test mode to confirm

dreamy needle
#

So i tried and nothing is showing up when creating the invoice

serene moon
#

Can you share an example?

dreamy needle
#

here is the quote

#

here is th invoice

serene moon
#

How exactly did you create the quote and the invoice?

#

Can you share the code?

dreamy needle
#
export const createStripeQuote = async ({ products, sellerId, customerId }: IStripeQuote) => {
   const parseProductToLine = () => {
      let lines: Stripe.QuoteCreateParams.LineItem[] = []
      for (const product of products) {
         const line = { price: product.default_price as string, quantity: 1 }
         lines = [...lines, line]
      }
      return lines
   }
   const quote = await stripe.quotes.create({
      customer: customerId,
      line_items: parseProductToLine(),
      on_behalf_of: sellerId,
      header: 'test header',
      metadata: { test: 'test' },
      footer: 'test footer',
      description:
         'Siret: xxxx x xx x xxxx xxxx      address: 11 village de la coquerire             50480 sainte mere église              TVA: xxx xx  xx x x xx ',
      transfer_data: {
         destination: sellerId
      }
   })
   console.log('quote', quote)
   return quote
}
serene moon
#

How did you create the invoice from the quote?

dreamy needle
#

from the button turn into invoice

serene moon
#

Where are you seeing the button to convert it into an invoice?
I created a test quote and I don't see it 🤔

#

ah its draft, give me a second

#

huh you're right. It doesn't pass through the same information to the invoice.

One thing I observed is that it creates the invoice in draft state so I believe the workaround here would be to update the invoice separately by calling the API once you convert the quote to an invoice and add in a custom field for the SIRET number

dreamy needle
#

So i have to use custom field data in invoice ?

serene moon
dreamy needle
#

I tried and the result is not really pro

serene moon
#

not sure I follow "not really pro" 😅
Is it not adding the SIRET number?

dreamy needle
#

yes it's but i have a list of thing that the french law need and it's look awfull on the quote or invoice

serene moon
#

If you want to show it as a list then you can add it as four separate custom fields instead

#

maybe that would render it a bit better

dreamy needle
#

yes for the invoice but not for the quote right ?

serene moon
#

yes, quotes don't have custom fields support yet 😦
I can definitely file a feature request for that

serene moon
#

the link doesn't highlight the part you were looking at, mind sharing a screenshot instead?

dreamy needle
#

oh it's about law in europe and they have a differente invoice, is it possible to have this one ?