Jump to content
thirty bees forum

Question

Posted

Hi. I need modify invoice template (actually this file is invoice.summary-tab.tpl). I need to add one extra field. This is easy. But this field must contain date which is calculated from to variables. One is invoice generated date and this is already existing value. The other on must be invoice date + max_payment_days from table "customer". Can somebody tell me how to construct this ?

 

Thank You

8 answers to this question

Recommended Posts

  • 0
Posted

Are you from germany? Is this "max_payment_days" a constant?

I use something similar... My code looks like:

{"+13 days"|date_format:'%d.%m.%Y'}

Of course this only works with a constant.

  • 0
Posted (edited)

Hi

 

I'm from Estonia and here I need Due Date on invoice. Sometimes customer need Invoice before payment and in this case I need to put this Due Date on invoice

About max_payment_days. This max_payment_days is in SQL table (customer) and is marked as INT. It is for every customer. Now i try to modify file invoice.summary-tab.tpl (root/pdf) but I don't know how to tell TB that there is need to add INT to DATETIME and then show this as date.  I add if condition, that this DUE date is visible only when max_payment_days value is not 0. And this is working. But I don't know how to add this to invoice date. So far I got only errors or unwanted result. File is added. All this is from TB1.1.x   At the moment Due Date result is "0" which is definitely not what I need. If  i replace both  values with numbers, then everything is working. So this summation is working. I'm not sure but i think that because one is DATETIME and another is INT then result is something what TB can't understand.

invoice.summary-tab.tpl

Edited by led24ee
  • 0
Posted

"They" are my clients. And I'm not developer but some little changes must be done.

And YES, This solution is working.

 

Thank You

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...