edit invoice and shipping invoice.

  • Posts: 86
  • Thank you received: 2
11 years 9 months ago #86611

Hello,

I'd like to aks how to change some things in invoices and shipping invoices. I hope all these change are possilbe.

1.) the invoice now is like this: (please do not be confused, the two images are in two different laguages.)



the invoice should be:


- add new column, "vat-percentage" to every product
- shipping cost before vat (is not added to the image above!)
- subtotal for every vat-category
- sum of different vat

2.) the shipping invoice:
The client fills in the billing address. Which is normally also the shipping address.
Only when the client has a different shppping adress, he/she fills in the shipping-adress-form.

At the moment the billing address is not displayed when billing adress and shipping adress are the same.
Would it be possible to display the billing address as shipping address when shipping adddress is empty (not filled in)? I hope to explain myself.

Thank you for your indications.

Last edit: 11 years 9 months ago by scharfet.

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #86692

Hi,

You can edit the view "order / invoice" (backend template) in HikaShop > Display > Views.
In this view, change all the elements as desired, this view is for invoice and shipping invoice.

You should find all the needed elements in the object "$this->element", it require some PHP knowledge.

Please Log in or Create an account to join the conversation.

  • Posts: 107
  • Thank you received: 3
11 years 8 months ago #93125

Hi.

I've got the attachinvoice plugin and I want to modify the file invoice.php to get a new column and show the product tax by each line (percentage). I've modified the code and now the column appears in the invoice, but I don't know the code to extract the tax percentage from the database. Please can you help me? I know where to put it but not the code.

Please help!

Thanks.

PD: I attach an image of my invoice layout.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 8 months ago #93204

Hi,

The tax price is in the variable "$product->order_product_tax".
You can find the variable "$product->order_product_price" too, so if you make a little calculation you should find the % of the tax without a sql request.

Please Log in or Create an account to join the conversation.

  • Posts: 107
  • Thank you received: 3
11 years 8 months ago #93271

Ok. I think it means that these data aren't stored in the database.

To someone who need it, I've made the calculation:

round(($product->order_product_tax)*100/($product->order_product_price),0);

and now is working fine. This code calculates the tax percentage. I've rounded it to 0 decimals but you can round it to your desired decimals.

Thanks.

The following user(s) said Thank You: Xavier, anoma3

Please Log in or Create an account to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum