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