#nerder_best-practices

1 messages ยท Page 1 of 1 (latest)

pale gyroBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1245893131044388926

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

frail talon
#

One attempt i've done is using invoice_settings.custom_fields

#

While this works correctly and adds the value to the invoice, then the value is not present in the export for some reason

#

And give where the invoice template places it I guess that it (up top) I don't think is meant to be used this way

loud patio
#

How are these invoices created? Is it one-time invoice or the invoice from subscription?

frail talon
#

both

#

the expected behaviour is similar as if the customer was an actual business

loud patio
#

then the value is not present in the export for some reason
What do you mean by the export here?

#

Could you illustrate the scenario in an example invoice (in_xxx)?

frail talon
#

the export as CSV that you can do for invoices

#

yes one sec

#

in_1PMIz4LAVB3C1lDIWwgBfJxY

#

you can see the details here

#

my invoice_settings.custom_fields['TIN'] is added up top

#

but my intention was to add an extra filed under the customer information (so under Bill to)

#

What do you mean by the export here?
And by export I mean the CSV export of the invoices

loud patio
#

Thanks for sharing! The custom fields on the invoice will be shown at the top of the invoice

#

I'm afraid if it's not possible to add custom tax ID under Bill to section

frail talon
#

Ok, then I guess is just not possible to add any text at all

#

my second best option will be invoice.metadata then

loud patio
#

metadata won't be shown on the invoice, but it'll be helpful for your own reference

frail talon
#

Yes, but I see that they will be added in the CSV export

#

so that might work actually

loud patio
#

You can custom Tax ID in both custom fields and metadata, so that tax ID can be shown on invoice and exported CSV

frail talon
#

ok that is one option

#

another qq

#

does the customer.description appears in the Invoice?

loud patio
#

It only appears if the customer name is not set

#

if the customer name is set, description on the customer won't be shown

frail talon
#

Ok too bad

#

all other solutions I can think off are quite hackinsh

#

but why the validation on the Tax ID is so strict anyway?

#

I mean, is not like there is an actual validation going on

pale gyroBOT
mint yacht
frail talon
#

ok it make sense

#

Is just thought for business customers only

#

but now that i'm checking there is no actual way to set the metadata of the invoice when creating a subscription

#

Is the invoice taking the ones from the subscription instead?

#

in the CSV export there is the column for the metadata of the subscription, but is always empty

mint yacht
#

can you share the subscription id where you tried setting the metadata?

frail talon
#

you can check this one: sub_1PMJS3LAVB3C1lDIiz5XaI9J

loud patio
#

Are you exporting CSV of the invoice or subscription?

frail talon
#

invoice

loud patio
#

You'd need to manually update the metadata on the invoice object itself. Your system could listen to invoice.created event and update the metadata on the Invoice, so that the metadata will be shown in the CSV export

frail talon
#

ok i see

#

I was mislead by the fact that I saw the column there

#

achieving this is quite a lot of work

#

seems like i'm fighting agains the system

loud patio
#

as of now, tax ID is only supported on the business, so this is the only workaround

frail talon
#

All clear, thank you anyway for your help

#

I acknowledge that is indeed a weird ask, but as you know each country has is own weird rules

#

Have a good rest of the day @loud patio ๐Ÿ‘‹