Version 3.0.3.2
I'm editing the twig files to create my invoices.
My invoices have to have the date of the invoice. I'm selling in Germany so they will be very particular about this, it is not the same as the order date. If the order was create and I processed things the next day then the invoice date will be different.
Is there a help page on the internet listing all the php objects so I can just look and find things like invoice date? (I might need other things so a manual listing everything might be handy).
Or does know just which php object gives me the invoice date?
I'm editing the twig files to create my invoices.
My invoices have to have the date of the invoice. I'm selling in Germany so they will be very particular about this, it is not the same as the order date. If the order was create and I processed things the next day then the invoice date will be different.
Is there a help page on the internet listing all the php objects so I can just look and find things like invoice date? (I might need other things so a manual listing everything might be handy).
Or does know just which php object gives me the invoice date?
You know there is a generate invoice in the orders section right ?
Although understanding this will be a lot of help to you.
http://docs.opencart.com/en-gb/developer/module/
To answer your question - I doubt there is such a thing on the internet, but feel free to create one Although understanding this will be a lot of help to you.
http://docs.opencart.com/en-gb/developer/module/
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
Yes the orders section creates invoices with the file admin/view/template/sale/order_invoice.twig and this is what I'm editing. And this doesn't have the time stamp as to when the invoice was created.
Here is a link to a German Government pdf (in English)
https://www.existenzgruender.de/SharedD ... cationFile
You can see it's compulsory to have the invoice date.
There are a few other things I need to change on the invoice to make it legal in Germany, but that was easy enough, it's just the invoicing date I can't solve.
https://www.existenzgruender.de/SharedD ... cationFile
You can see it's compulsory to have the invoice date.
There are a few other things I need to change on the invoice to make it legal in Germany, but that was easy enough, it's just the invoicing date I can't solve.
So when you process the order I assume you update the order status? oc_order_history has date_added, you might be able to pull off of that, otherwise you will need to write some simple logic to generate a date.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
"date_added" looks like the date when the order was was added (when the customer clicked on the button to buy) because it's on an order object. Because it's on a "order" object.
I have no idea about "oc_order_history"
But when I create the invoice might not be the same day as when my customer ordered it.
Code: Select all
<td style="width: 50%;"><b>{{ text_date_added }}</b> {{ order.date_added }}<br />
But when I create the invoice might not be the same day as when my customer ordered it.
I'm starting to think it might not be possible.
I dumped the mysql backend to a text file and searched it for the test "invoice" it looks like when I click the button to generate an index the table oc_order will have the field "invoice_no" populated with the next invoice number.
However although the text search for "invoice" came up with a couple of other results, none of them looked like the date when the invoice is generated is stored anywhere, which is a bit of a problem if you want to obey German law for writing an invoice.
Any thoughts?
I dumped the mysql backend to a text file and searched it for the test "invoice" it looks like when I click the button to generate an index the table oc_order will have the field "invoice_no" populated with the next invoice number.
However although the text search for "invoice" came up with a couple of other results, none of them looked like the date when the invoice is generated is stored anywhere, which is a bit of a problem if you want to obey German law for writing an invoice.
Any thoughts?
- Add invoice_date datetime NOT NULL to table 'order'
- Get invoice_date from order
- Add text and date to shipping and invoice template
Faster to write modification then explaining all the steps ...
- Download attachment and install using extensions - Installer
- After that Refresh Modifications
- Get invoice_date from order
- Add text and date to shipping and invoice template
Faster to write modification then explaining all the steps ...
- Download attachment and install using extensions - Installer
- After that Refresh Modifications
No, as one poster before has written, use his solution (or the idea behind).
Correct, order create date, delivery date and invoice date are rare the same dates.matthewbaynham wrote: ↑Sun Mar 28, 2021 3:53 pmI dumped the mysql backend to a text file and searched it for the test "invoice" it looks like when I click the button to generate an index the table oc_order will have the field "invoice_no" populated with the next invoice number.
However although the text search for "invoice" came up with a couple of other results, none of them looked like the date when the invoice is generated is stored anywhere, which is a bit of a problem if you want to obey German law for writing an invoice.
Any thoughts?
And on the Invoice, the correct date of the Invoice creation must be printed - and none of the others.
Using mentioned solution, you may fullfill the requirement.
But! > Keep in mind, this is only a temporary solution, whenever the German Finance is inspecting your bookkeeping, you have no chance to become proven.
Because the dates can be "manipulated" directly in the database.
And the so called "Invoice" is therefore NOT a real Invoice - only HTML generated content which can be printed.
To "obay" the German (and other Countries Law), you must create "non reversable" Invoices - like PDFs.
Additonally you have to check if the "Registrierkassenpflicht" https://www.deutsche-handwerks-zeitung. ... 554/332932 a requirement is for you .. and how to combine such with your "Invoices".
Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.
Who is online
Users browsing this forum: No registered users and 33 guests