The implementation of GST in India has brought in a lot of statutory changes. We are now required to print the HSN Code (harmonized code) of each item on the invoice. So I was thinking I can create a language override for GTIN and use it for storing HSN code of item.
But the question is how to print it in the invoice? Any ideas or better suggestion?
J 3.7.3 / VM 3.0.18
Any has a solution / suggestion?
Somebody please help me on this !!
I desperately need a solution for this. Anyone out here?
Create a template override for invoice and modify it to your liking. If GTIN is not available in data, use product model or DB query to get it.
I would totally recommend ARTIO VM invoice if you're
not comfortable with coding, their extension makes it extremely simple
to customize the invoices to your liking and add any info you need on them : https://www.artio.net/virtuemart-tools/vm-invoice-generator
Thanks dear Loppan
I am using Artio VM Invoice. Guess I need to ask their support on how I can accomplish this !!
Dear Ghost, thanks for your response, but I do not have the expertise to do what you are suggesting.
Quote from: rage76 on August 03, 2017, 10:00:51 AM
Thanks dear Loppan
I am using Artio VM Invoice. Guess I need to ask their support on how I can accomplish this !!
Hmm, I had a closer look and with Artio's VM Invoice you're not able to add the GTIN on the invoice by default - strange, I thought they had everything :). I would definitely explain the situation to the developer and request this feature, though. Perhaps it will be mandatory in more countries eventually....
It is a shame that you are using Artio invoices - it is simple to add this to VM core invoices
the gtin is just $product->gtin
Quote from: AH on August 03, 2017, 13:15:24 PM
It is a shame that you are using Artio invoices - it is simple to add this to VM core invoices
Dear AH, I am not using Artio Invoices for just this purpose. I am using because it gives me a lot of flexibility and ease in designing the invoices that I was unable to do via the core VM invoices. Although I agree it is quite do-able in Core VM too !!
In case there are others like me who would like to add "HSN Codes" to each of the product, the easiest easy way to do it is through VM custom fields. But I am facing an issue with this method;
The custom field shows on the product page. I donot want it to be visible on the product page and would only like to show/print it on the invoice. If someone has a solution to this, kindly guide me suitably.
Thanks in anticipation.
Add something to 'Position' field in your custom field.
Quote from: Ghost on August 04, 2017, 09:08:02 AM
Add something to 'Position' field in your custom field.
You mean anything random? Strangely, it does work. seems like a good hack. Hope it wont interfere with anything else !!
The model has been adjusted to allow product fields to be included in the order view - when the next release is available you will be able to display the GTIN
$item->product_gtin
You forgot to mention, it works on some php versions. The reason that it worked for some and for others not.
Quote from: AH on August 05, 2017, 20:03:54 PM
The model has been adjusted to allow product fields to be included in the order view - when the next release is available you will be able to display the GTIN
$item->product_gtin
Dear AH, that is good news. This means I can wait for the next release. Am sure it is not too far now !!
Has this been implemented in 3.2.3.9614? How to print this in the invoice? BTW, when can we expect the next stable release?
My compliments to the VM team on releasing the stable VM 3.2.4
And I am happy to announce that I have updated it on my live site. I am trying to figure out how to print "GTIN Number" on the invoice.
Please guide !!
Thanks...
Should now work in the loop with
echo $item->product_gtin;
Quote from: Milbo on August 23, 2017, 19:38:47 PM
Should now work in the loop with
echo $item->product_gtin;
You mean I have to add this to a file to make it work? In that case please tell me the filename too !!
Dear Milbo
Please help me on this.
Invoice items are handled by:
\components\com_virtuemart\views\invoice\tmpl\invoice_items.php
Create your own override to the invoice_items.php and include the display of the GTIN.
Put the new invoice items override in:-
\templates\yourtemplate\html\com_virtuemart\invoice\invoice_items.php