Payment Condition Templates

Depending on the customer or product we might want to customize the invoice footer or payment conditions (“Rechnungsbedingungen”) with a predefined (legally required) text.

For example:

  • a note whether balance is automatically deducted via SEPA
  • a note that an inner-european delivery from Germany is VAT-exempt

Maybe simply a list of conditions which can be added from checkboxes, or macros to paste them in or something?

This might be partially solved by invoice templates per customer/invoice, but with multiple conditions one might want to add different fragments to each invoice quickly, making separate templates unfeasible, especially as you have to then adjust each template when you want to change the actual design…

Hi,

You may be able to use custom settings defined for the client or a group.

If you’d like to see a feature added please create an issue here:

Hello @xerus

for the inner-european delivery i already opened a feature-request on github:

Which i also discussed there with @david

Regards, Andreas

1 Like

@designguide yet I would prefer a generalized solution, so InvoiceNinja does not have to be continuously programmatically adjusted for legislations of different countries.

If there was a stock set of translations, (the one linked above appears to cover most, but not all?), It would make sense to have these stored in the translations, so that the strings can be localized depending on client locale.

We have the EU tax rules already built into the logic, so we could then use those to show the relevant strings in the footer of the template?

@david Normally these information regarding reverse VAT is located here:

@designguide

This is relatively easy to implement. The suggest here would be to use a variable in the public notes or terms section so that users could “opt” into this. I’ll mock something up and advise when ready for testing.

1 Like

I didn’t want to disrupt this thread here. But for me that would be perfect.

@david

This is relatively easy to implement.

So will you integrate it in a upcoming version? :smiley:

Feature request on github is here: Legal Text block on Invoice if it is a reverse charge invoice in the EU (VAT free) · Issue #8540 · invoiceninja/invoiceninja · GitHub

Thx, Best regards,
Andreas

Working on this now. One thing to clarify here:

  1. Triangular transactions, there is no way for us to determine this one, we’ll need to use a separate label for this the placeholder is:
$triangular_tax
  1. For Intracommunity and/or Reverse Tax the placeholder
$tax_info

Should be used.

Just to note, I’ve checked in the code for this, however we’ll need to wait for the translation strings to populate in Transifex and then i’ll backfill them and then tag a release.

I used this now for a long time. It is working great for me until now :-). All my invoices go to Companies with UID in the EU.

Now i have the first EU-invoice for a Company which has no VAT number. And then the invoice should not be VAT-free.

Are you checking in these tax rules if there is a VAT-number present in company details. Or how do you do it? Because for me this invoice it always with the $tax_info - Label. And this label should only be displayed when VAT-free, correct?

Thank you very much,
Regards, Andreas

@designguide

here is the logic used, perhaps we need to update this?

private function taxLabel(): string
{

(By default show nothing)
    $tax_label = '';

(If we have a reverse tax item, then display the corresponding label)
    if (collect($this->entity->line_items)->contains('tax_id', \App\Models\Product::PRODUCT_TYPE_REVERSE_TAX)) {
        $tax_label .= ctrans('texts.reverse_tax_info') . "<br>";
    }

(if the clients country is not the same as the company country  - show the intra community tax info)
    if((int)$this->client->country_id !== (int)$this->company->settings->country_id) {
        $tax_label .= ctrans('texts.intracommunity_tax_info') . "<br>";
    }

    return $tax_label;
}

I think the last block is where we are hitting this issue. We would need to create some additional logic to filter this scenario.

Would it be safe to assume that if there is tax on the invoice, this field should show no text?

Hello @david,

Oh, so this is not a perfect logic. The problem i now have is exactly because of the missing logic.

In the last if you have also to check if the field “VAT number” is also filled out. If so - the invoice can be without tax.

So in short:
If company country = client country: Display tax and do not display $tax_label
If company country != client country (client is in EU): Display tax and do not display $tax_label
If company country != client country (client is in EU) AND field “VAT number” is filled: Display no taxes on invoice and display $tax_label

This should be correct, but when automatic tax calculation is active i can not choose that when client is in the EU i think?

For my undertanding the correct way will be to check if the VAT number field is filled. Because then i am allowed to create a VAT free invoice (both VAT numbers have to be on invoice visible).

EDIT:
Can you tell me where i can see which text ist standard behind:
intracommunity_tax_info
triangular_tax_info
reverse_tax_info
(i can not see that on Invoice Ninja localization | Transifex without joining / creating account)

Regards, Andreas

Couple of issues with the suggested logic

If company country != client country (client is in EU): Display tax and do not display $tax_label

Not necessarily, they could be outside EU also

If company country != client country (client is in EU) AND field “VAT number” is filled: Display no taxes

Does every entity in EU (personal / business) have a vat number? I would have thought that personal clients, may not be vat registered at all?

Yes, I didn’t take that into account before. There also should be a if-clause for that.

No, just businesses can have a VAT number. But the point here is that they CAN have a VAT number. They may have one or have not. If not - then the invoice can not be tax free and it can not have the $tax_label on it.

So we need to build the rule for companies in EU like that i think?

The $tax_label text itself should be different. It can be also different when in EU and VAT number is filled. Because the legal text for a intracommunity delivery is different to intracommunity service.

@designguide

ok, i think i have this worked out now:

    private function taxLabel(): string
    {
        $tax_label = '';

        if (collect($this->entity->line_items)->contains('tax_id', \App\Models\Product::PRODUCT_TYPE_REVERSE_TAX)) {
            $tax_label .= ctrans('texts.reverse_tax_info') . "<br>";
        }

        if((int)$this->client->country_id !== (int)$this->company->settings->country_id) {
            $tax_label .= ctrans('texts.intracommunity_tax_info') . "<br>";

            if($this->entity_calc->getTotalTaxes() > 0)
                $tax_label = '';
            
        }

        return $tax_label;
    }

Hello @david ,

i do not understand that code 100% because i am no developer, but it looks good as far as i understand it.

Will it be part of one of the next updates?

Thanks, Regards,
Andreas

Because i need it to invoice a client i am pushing this. :slight_smile:
Would be greeeeaat if you can include that in one of the next updates.

Or should i make a request in github?

Thank you, Regards,
Andreas

@david

@designguide

it should already be available.