How to Edit Headers Over Quote Module Line Items

Hi everyone.

I’m stuck. I feel this should be easy but I’ve pulled my last hairs out. So, I want to edit this ā€˜Tax Amount’ header to say ā€˜GST Amount’:

But I can’t figure out how. My firefox inspector shows this, so it seems like this might be hard coded or uneditable in the Studio, but that doesn’t make sense because the beauty of SuiteCRM is that everything is editable to a granular level.

I’ve tried layouts, labels… man. Any help greatly appreciated!

Thanks!

Hi,

You should be able to change this label in Studio as far as I know.

If you navigate to Studio > Quotes > Labels
Search for ā€œLBL_VAT_AMTā€

This should be the label that you can change, Change this to say ā€œGST Amountā€

Scroll to the top and click ā€œSave & Deployā€ and the Label should be changed.

Let us know if you come across any issues changing this

John,

The response is much appreciated.

I just tried under quotes/labels and there is no label called ā€˜Tax Amount’ as you can see in my screenshot above that can be changed. The only place I could find it was where it more logically should be which is under ā€˜line item/label’ and there is ā€˜tax amount’. however, changing the field does not change that deeply rooted header in the line items. It does, however, successfully change the label everywhere else.

For fun, I will do exactly what you said under the quote module, though, just to make sure. Here goes!
…
and fail.

sorry. that didn’t work either.

Strange.

Wayne

Hi Wayne,

When you change the label in the ā€œLBL_VAT_AMTā€ label in Studio>Quotes>Labels, I assume you are clicking ā€œSave & Deployā€ afterwards?

If you click ā€œSave & Deployā€, Scroll back down to the ā€œLBL_VAT_AMTā€ field and make sure that your change has been applied.
(If there is an issue, such as incorrect permissions, the field for ā€œLBL_VAT_AMTā€ will revert back to ā€œTax Amountā€ after clicking ā€œSave & Deployā€)

After clicking Save & Deploy, Does this field stay as ā€œGST Amountā€ or does it revert back to ā€œTax Amountā€?

Also, another quick question:
Which version of SuiteCRM are you running? I made the proposed change in Studio>Quotes>labels on a local 7.5.3 instance and it works as expected.

Good day, John, and thanks for your work and reply. Much appreciated. see my responses below:

When you change the label in the ā€œLBL_VAT_AMTā€ label in Studio>Quotes>Labels, I assume you are clicking ā€œSave & Deployā€ afterwards?

–> You assumed correctly.

After clicking Save & Deploy, Does this field stay as ā€œGST Amountā€ or does it revert back to ā€œTax Amountā€?

–> It stays as it should as ā€˜GST Amount’. that is not the problem. This part works fine (the label).

Which version of SuiteCRM are you running? I made the proposed change in Studio>Quotes>labels on a local 7.5.3 instance and it works as expected.

–> Version 7.4.1

Sugar Version 6.5.20 (Build 1001)

I would like to upgrade but I’m not very good with servers, backups, etc. If you have a great tutorial somewhere about how to backup and upgrade suiteCRM I would love to do this and do it reguarly. But I"m always nervous.

the problem is odd becuase the label changes change and stick, but the changes don’t make it to the line items of the quote module in the header as per my original screenshot.

Again, if you have a quick and easy way of backing up and upgrading I would love to do it. I’m currently using Cpanel but I’d like to learn for self hosting too since my friend is doing self hosting. There must be a link around but I was unable to find after much searching…

Thanks John

Hi Johh

apparently my friend has paid a programmer adn they have figurd this issue out. I’m sure he will post it to the open source world here when it’s done so maybe save your energy unless it’s already done. She was working on adding other tax options and then must have fixed this header issue at the same time… hopefully both are true for everyeone !

Hi Wayne,

That’s good to hear.

However, there is another thing we can try in the meantime if you would still like to give it a go:

If you’ve made the change to the label in Studio, and the change appears to have applied in studio,
Try navigating to the quotes module in the CRM and pressing CTRL+F5 to clear your cache & Refresh the browser.

If you do this, does the label change from ā€œTax Amountā€ to ā€œGST Amountā€ on the line items?

If not, You can navigate to the file directory:

/custom/modules/AOS_Quotes/language/

(If this location doesn’t exist, feel free to create it)

If there is a file in this location called ā€œen_us.lang.phpā€, Does it contain any reference to ā€œLBL_VAT_AMTā€ ?

If it already exists but doesn’t contain any reference to ā€œLBL_AMT_VATā€, then you can add the line

  'LBL_VAT_AMT' => 'GST Amount',

If the file does not exist, You can create it and ensure that it contains:

 <?php
 'LBL_VAT_AMT' => 'GST Amount',

Then, run a Quick Repair and Rebuild in your CRM, press CTRL+F5 to clear your cache, and the label should hopefully have successfully changed.

Hi John, to help community and pay it back I always am happy to be a guinea pig until I have money to actually donate which i will also do.

I still feel like we might be on a different page here, but, I did everything you said in this. After doing F5 no benefit.

The LBL_VAT stays no problem in studio. The change, however, does not show up in the header - the problem persists.

Also, I went into the server and into the PHP file and here is a screenshot of what I found:

This is why I think we are on a different page. The label in question is not listed here at all. The label that I am trying to change is this one:

This one above is under ā€˜line items’ and ā€˜labels’ not ā€˜quotes/labels’

Why? Because the only reference that i could find to ā€˜tax amount’ as displays in the following screenshot , is in line items - where it should be.

So to me it seems like a problem in a reltionship between ā€˜line items’ and ā€˜quotes’ and how they interact or something. But i"m not a programmer as you have probably gleaned :wink:

Hi there, did you figure out how to change the headings? :slight_smile: Following!

I just reviewed this and it has been so long that I actually don’t know if I have solved this. I am so busy these days but I will do my best to look into this again. If you want you can PM me on the issue @cammie57 until I actually look into it. It might take me a few days at this rate, my apologies…

Line items are added using the JS file at modules/AOS_Products_Quotes/line_items.js while you can check that the field which is used to display line items in Quotes is ā€˜line_items’ (check modules/AOS_Quotes/vardefs.php for source) which is pointing to modules/AOS_Products_Quotes/Line_Items.php display_lines function.

You can customise the Vardef for Quote and move the files to custom folder to do any customizations.

awesome. thankfully I just happened to study a bit of JS this year! Sadly no PHP but it’s on my list apparently now… thanks for the tips

Hey there. I finally had time to get to this. Actually, I got forced to get to this. Check out this thing I wrote and hopefully we can get this coded right into suitecrm soon! Hope it helps in the meantime, how to change the row headers in the line items…

https://wayneoutthere.com/2020/09/28/how-to-change-the-row-headers-in-suitecrm-line-items-in-quotes-module/

1 Like

I’ve just written another one in a series as I punch myself in the face figuring out stuff that is too hard for me. HA

https://wayneoutthere.com/2020/09/28/how-to-modify-the-display-of-suitecrm-product-line-item-rows-in-quote-module/

I really wish I could understand this part. I have been working on this for three weeks and cannot get a breakthrough. I now understand where vardefs are stored, I understand roughly what they do, I understand a lot about Line_Items.php and line_items.js but I cannot bring the Product module pricing successfully into the Products_Quotes Line items cells.

I also cannot seem to find where the actual array is stored for a custom field. I can see the array is stored in vardefs.php for the fields that come with SCRM, but I can’t see where custom arrays are stored. I set the data type (ie. currency) in Studio, and save and it successfully saves and deploys but I can’t find where that custom field is saved. I would also like to know about that as it might be related to my challenge.

Very much appreciate any tips or tricks. Thanks!

Hey folks. I just wanted to say that although I really wanted to learn how to do all this on my own, I hit a road block of time and skills. Because @cherub-chum (business / contact details are in user profile) was so helpful throughout community and gave me the most useful tips in this thread and others, I decided to reach out to his company and ask for services. I can say that if you need help, they can definitely help you and save you time. I think the part that was most impressive was they were even willing to help me learn (which was my goal) so if you are a developer, too, they might be able to help you with this and that as you help your own customers. I usually don’t promote stuff because it looks like spam but i wanted to share this story because Salesagility (the folks who make all this possible) also has their own dev team (didn’t have time to research - was in a rush). I felt a huge reduction in stress once I knew ā€˜everything was working’. So in some cases it’s great to spend time and learn but in other cases, I just learned, paying is the best option, ha. I will ā€˜do my best’ to share my learning about line items in a blog post one day but for now at least if you’re stuck on this you can contact a company who can quickly help. Thanks to all you out there!

2 Likes

Hi, I would like to remove ā€œTax Amount" in Line Items.
I did comment line 162, 163, and 179-184 in Line_items.php.

But the Tax Amount is still showing after Repair, I was wondering if you could give me some advice on it.

Thank you very much

Complete removal of a column, I’ve not actually done. I’m a bit busy to look in depth for a while but it’s my guess that you would need to remove:

$product .= "<td width='12%' class='tabDetailViewDL' style='text-align: right;padding:2px;' scope='row'>".$mod_strings['LBL_VAT']."</td>"; $product .= "<td width='12%' class='tabDetailViewDL' style='text-align: right;padding:2px;' scope='row'>".$mod_strings['LBL_VAT_AMT']."</td>";

and then probably the equivalent js script lines in line_items.js that print it out.

Probably @cherub-chum will be able to quickly confirm or deny my direction :wink:

Hope this ā€˜best guess’ helps.

you should also check the line_items.js file to take care of your changes
Check these lines too

Yes, thank you very much,
I just found it from this post