Display 2 taxes in Quotes and Invoices (GST 5% and PST 7%) on seperate lines?


It looks like there is a lot of javascript required. But no one can even point me to where this would be in the docs??

you are looking for the line items section.


to save the line with the value values


some of this will be javascript and others php.

The files above are for the quotes module and would be very similar for the invoices.

hopefully this points you in the right direction.

Thank you. I have been trying to figure this out for a while and you have confirmed what I was thinking so thank you.

I will create a custom/modules/AOS_Products_Quotes folder and put those three files in there to start the customization without touching the core files.

Does anyone have found something for displaying 2 taxes? We need same too.

Thanks in advance!

Can we have more info? about adding 2 taxes?

Once you figure this out it’s fairly straight forward but it took me quite some time to figure it out.

this specific request is heavily dependent on JavaScript.

using this file modules/AOS_Products_Quotes/line_items.js

copy this file into your custom folder


look in that file for “VAT” and start modifying the javascript file.

What I have done is taken the current tax drop down and duplicated it with a slightly different name “vat_pst” in my case and then do the calculations based on the new dropdowns.

I looked for a php/mysql solution when the answer was to brush up on the JavaScript which from what i’ve seen in the developer videos is the direction that sugar is going in. ie more and more javascript.

Sorry I don’t have a specific answer but hopefully that helps.

I have this to the point were it is doing the calculations.

It is not saving my selections for the custom pst and gst fields…


although when I capture the post data I see it…

[pst_c] => Array ( [0] => 17.5 )

i get the selection but when it goes through the save process in AOS_Product_Sales it doesn’t save the data.

I am so close with this please help.

From what I can remember you need to make sure that your field follows the same naming conversions.


line 44 - $post_data[$key.$field_def[‘name’]][$i];

The post data must start with a key, from what I can remember it will be either product_ or service_ hopefully this helps.


Thanks to smugford and Ian, I am not a pro in php and/or Java, I can edit, add or change anything but I am not able to find which one we need to add. We are ready to pay if someone know how to do.


I am just figuring out this code myself.

They do have development partners I would email Suite themselves and ask for a developer reference for your country.

I added the custom field to litenitemeidtviewdefs.php after adding the product_pst field to the lineitems quick create view.

7 =>
array (
‘name’ => ‘product_pst_c’,
‘label’ => ‘LBL_PRODUCT_PST’,

It is now saving the selection but it is not displaying the selection in the box.

i think I need to copy the vat_hidden code in Line_Items.php

I have talked to a Partner and he tell me we can take shipping taxe for the second taxe we need, I will try it and return to you if working!

I had that thought as well. I decided not to do that because we made need to add a discount eventually.

I got it to work but it would take me a few days to put together a “How To” (which I may do as a learning exercise but not 100% on that)

No matter how you do it most of what you need is in line_items.js


Great, we will wait, I know it is in line_item.js, but I can’t work on it because we have a lot of job and unfortunately don’t have time for now.


Yesterday I have worked some hours on it and I don’t have all information to complete this (I think).

I have done this:

In Studio: add new fields in quote with name tax2_amount_c

In Studio: Quotes / Layouts / Editview and Detailview add the Row for the second taxes

add this line
Copied Line 147 and change LBL_TAX2_AMOUNT_C

[color=#ff0000]$groupEnd .= “

”.$mod_strings.": ";[/color]

Not sure If I need to add something else

add this line
Copied Line 174 to 180 and ad a 2 at each vat

[color=#ff0000]var f = x.insertCell(8 );
f.innerHTML = “”;
f.innerHTML += “” + vat_hidden + “”;

if (typeof currencyFields !== ‘undefined’){
currencyFields.push(“product_vat_amt” + prodln);

Copied Line 528 to 832 and change the name to LBL_TAX2_AMOUNT_C

[color=#ff0000]var footer_row4=tablefooter.insertRow(-1);
var footer_cell4 = footer_row4.insertCell(0);
footer_cell4.innerHTML=""+SUGAR.language.get(module_sugar_grp1, ‘LBL_TAX2_AMOUNT_C’)+": ";[/color]

Not sure If I need to add something else

It is what I have done for now, If you can help me to complete the work, it will be very helpfull for me and other!!


Anyone can help us? Do we need to switch to other CRM? We are ready to pay if is nessecary.



Were you able to post a “how to” I’d be interested in that? Spain has the same issue with dealers. VAT 21% + 5,2% R.E. which I need to display separately.


Hi Cperrot,
We are already at the same point here, Maybe no one have found the solution? I’m not able to find the complete solution for now because we have a lot of job.

Very sorry!

thanks for your reply. I am amazed that SutieCRM OpenSales cannot be used in Canada at all and that no one is actually taking this problem up as a feature request.

You are right, but the company tell us that we need to made it as a module.